From 9c4d497ef24a58d1a9ff907e1484e9b5093b726b Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Thu, 7 Dec 2006 15:43:42 +0000 Subject: [PATCH] new theorems added. does not comile well yet :(( problems found in - csubc/csuba.ml (exception "List.nth" raised by matitaGui.ml at line 244) - ty3/pr3.ml (matitac.opt returns with exit code 3 without evident error) - sn3/props.ma (assertion failure raised by discrimination_tree.ml at line 62) --- .../LAMBDA-TYPES/Level-1/Base/makefile | 32 +- .../Base/{ext/plist.ma => plist/defs.ma} | 9 +- .../LAMBDA-TYPES/Level-1/Base/plist/props.ma | 33 + .../LAMBDA-TYPES/Level-1/Base/theory.ma | 4 +- .../LAMBDA-TYPES/Level-1/Base/types/defs.ma | 110 +- .../LAMBDA-TYPES/Level-1/LambdaDelta.ma | 4404 ----------------- .../LAMBDA-TYPES/Level-1/LambdaDelta/T/dec.ma | 10 + .../Level-1/LambdaDelta/T/defs.ma | 11 - .../Level-1/LambdaDelta/arity/defs.ma | 2 +- .../Level-1/LambdaDelta/csub3/fwd.ma | 336 -- .../Level-1/LambdaDelta/csuba/arity.ma | 77 +- .../Level-1/LambdaDelta/csuba/clear.ma | 41 + .../Level-1/LambdaDelta/csuba/defs.ma | 2 +- .../Level-1/LambdaDelta/csuba/drop.ma | 793 +++ .../Level-1/LambdaDelta/csuba/fwd.ma | 432 ++ .../Level-1/LambdaDelta/csuba/getl.ma | 449 ++ .../Level-1/LambdaDelta/csubc/arity.ma | 38 + .../Level-1/LambdaDelta/csubc/clear.ma | 149 + .../Level-1/LambdaDelta/csubc/csuba.ma | 38 + .../LambdaDelta/{ceqc => csubc}/defs.ma | 10 +- .../{ceqc/props.ma => csubc/drop.ma} | 337 +- .../Level-1/LambdaDelta/csubc/drop1.ma | 198 + .../Level-1/LambdaDelta/csubc/getl.ma | 44 + .../Level-1/LambdaDelta/csubc/props.ma | 29 + .../Level-1/LambdaDelta/csubst1/defs.ma | 2 +- .../LambdaDelta/{csub3 => csubt}/clear.ma | 58 +- .../LambdaDelta/{csub3 => csubt}/defs.ma | 18 +- .../LambdaDelta/{csub3 => csubt}/drop.ma | 548 +- .../Level-1/LambdaDelta/csubt/fwd.ma | 42 + .../LambdaDelta/{csub3 => csubt}/getl.ma | 314 +- .../LambdaDelta/{csub3 => csubt}/pc3.ma | 36 +- .../LambdaDelta/{csub3 => csubt}/props.ma | 14 +- .../LambdaDelta/{csub3 => csubt}/ty3.ma | 82 +- .../Level-1/LambdaDelta/drop1/defs.ma | 14 +- .../Level-1/LambdaDelta/drop1/getl.ma | 259 +- .../Level-1/LambdaDelta/drop1/props.ma | 69 + .../Level-1/LambdaDelta/fsubst0/defs.ma | 2 +- .../Level-1/LambdaDelta/getl/defs.ma | 2 +- .../Level-1/LambdaDelta/iso/fwd.ma | 2 + .../Level-1/LambdaDelta/leq/defs.ma | 2 +- .../Level-1/LambdaDelta/lift/defs.ma | 2 + .../Level-1/LambdaDelta/lift/props.ma | 16 + .../Level-1/LambdaDelta/lift1/fwd.ma | 70 +- .../Level-1/LambdaDelta/lift1/props.ma | 114 +- .../LAMBDA-TYPES/Level-1/LambdaDelta/makefile | 32 +- .../Level-1/LambdaDelta/pc3/defs.ma | 2 +- .../Level-1/LambdaDelta/pr0/fwd.ma | 1588 +----- .../Level-1/LambdaDelta/pr2/props.ma | 50 + .../Level-1/LambdaDelta/pr3/defs.ma | 2 +- .../Level-1/LambdaDelta/pr3/fwd.ma | 88 + .../Level-1/LambdaDelta/pr3/iso.ma | 956 +++- .../Level-1/LambdaDelta/sc3/arity.ma | 333 +- .../Level-1/LambdaDelta/sc3/props.ma | 221 +- .../Level-1/LambdaDelta/sn3/defs.ma | 2 +- .../Level-1/LambdaDelta/sn3/fwd.ma | 82 + .../Level-1/LambdaDelta/sn3/props.ma | 1328 +++++ .../Level-1/LambdaDelta/subst0/fwd.ma | 765 +-- .../Level-1/LambdaDelta/subst1/defs.ma | 2 +- .../Level-1/LambdaDelta/tau0/defs.ma | 2 +- .../Level-1/LambdaDelta/tau1/defs.ma | 2 +- .../Level-1/LambdaDelta/theory.ma | 36 +- .../Level-1/LambdaDelta/tlist/defs.ma | 49 + .../Level-1/LambdaDelta/tlist/props.ma | 120 + .../Level-1/LambdaDelta/ty3/defs.ma | 2 +- .../Level-1/LambdaDelta/ty3/pr3.ma | 6 +- 65 files changed, 6708 insertions(+), 8214 deletions(-) rename matita/contribs/LAMBDA-TYPES/Level-1/Base/{ext/plist.ma => plist/defs.ma} (85%) create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/Base/plist/props.ma delete mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/fwd.ma create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/arity.ma create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/clear.ma create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/csuba.ma rename matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/{ceqc => csubc}/defs.ma (85%) rename matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/{ceqc/props.ma => csubc/drop.ma} (61%) create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/drop1.ma create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/getl.ma create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/props.ma rename matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/{csub3 => csubt}/clear.ma (71%) rename matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/{csub3 => csubt}/defs.ma (75%) rename matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/{csub3 => csubt}/drop.ma (74%) create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/fwd.ma rename matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/{csub3 => csubt}/getl.ma (70%) rename matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/{csub3 => csubt}/pc3.ma (73%) rename matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/{csub3 => csubt}/props.ma (79%) rename matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/{csub3 => csubt}/ty3.ma (68%) create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlist/defs.ma create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlist/props.ma diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/Base/makefile b/matita/contribs/LAMBDA-TYPES/Level-1/Base/makefile index ffdb70ded..db1724d0c 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/Base/makefile +++ b/matita/contribs/LAMBDA-TYPES/Level-1/Base/makefile @@ -9,25 +9,31 @@ CLEANO=$(RT_BASEDIR)matitaclean.opt $(OPTIONS) devel:=$(shell basename `pwd`) +ifneq "$(SRC)" "" + XXX="SRC=$(SRC)" +endif + all: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) build $(devel) + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) build $(devel) clean: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) clean $(devel) + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) clean $(devel) cleanall: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEAN) all + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEAN) all -all.opt opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) build $(devel) -clean.opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) clean $(devel) -cleanall.opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEANO) all +all.opt opt: preall.opt + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) build $(devel) +clean.opt: preall.opt + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) clean $(devel) +cleanall.opt: preall.opt + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEANO) all %.mo: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) $@ -%.mo.opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) $@ + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) $@ +%.mo.opt: preall.opt + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) $@ preall: - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) init $(devel) + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) init $(devel) +preall.opt: + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) init $(devel) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/plist.ma b/matita/contribs/LAMBDA-TYPES/Level-1/Base/plist/defs.ma similarity index 85% rename from matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/plist.ma rename to matita/contribs/LAMBDA-TYPES/Level-1/Base/plist/defs.ma index 3a0b28571..9bd72de7a 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/plist.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/Base/plist/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/Base/ext/plist". +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/Base/plist/defs". include "ext/preamble.ma". @@ -36,3 +36,10 @@ definition Ss: let rec Ss (hds: PList) on hds: PList \def (match hds with [PNil \Rightarrow PNil | (PCons h d hds0) \Rightarrow (PCons h (S d) (Ss hds0))]) in Ss. +definition papp: + PList \to (PList \to PList) +\def + let rec papp (a: PList) on a: (PList \to PList) \def (\lambda (b: +PList).(match a with [PNil \Rightarrow b | (PCons h d a0) \Rightarrow (PCons +h d (papp a0 b))])) in papp. + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/Base/plist/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/Base/plist/props.ma new file mode 100644 index 000000000..ae5665fc6 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/Base/plist/props.ma @@ -0,0 +1,33 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/Base/plist/props". + +include "plist/defs.ma". + +theorem papp_ss: + \forall (is1: PList).(\forall (is2: PList).(eq PList (papp (Ss is1) (Ss +is2)) (Ss (papp is1 is2)))) +\def + \lambda (is1: PList).(PList_ind (\lambda (p: PList).(\forall (is2: +PList).(eq PList (papp (Ss p) (Ss is2)) (Ss (papp p is2))))) (\lambda (is2: +PList).(refl_equal PList (Ss is2))) (\lambda (n: nat).(\lambda (n0: +nat).(\lambda (p: PList).(\lambda (H: ((\forall (is2: PList).(eq PList (papp +(Ss p) (Ss is2)) (Ss (papp p is2)))))).(\lambda (is2: PList).(eq_ind_r PList +(Ss (papp p is2)) (\lambda (p0: PList).(eq PList (PCons n (S n0) p0) (PCons n +(S n0) (Ss (papp p is2))))) (refl_equal PList (PCons n (S n0) (Ss (papp p +is2)))) (papp (Ss p) (Ss is2)) (H is2))))))) is1). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/Base/theory.ma b/matita/contribs/LAMBDA-TYPES/Level-1/Base/theory.ma index 008ba2f22..9ecfdb7ed 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/Base/theory.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/Base/theory.ma @@ -28,5 +28,7 @@ include "blt/defs.ma". include "blt/props.ma". -include "ext/plist.ma". +include "plist/defs.ma". + +include "plist/props.ma". diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/Base/types/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/Base/types/defs.ma index 888d92669..e2bfeaa7c 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/Base/types/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/Base/types/defs.ma @@ -18,127 +18,129 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/Base/types/defs". include "ext/preamble.ma". -inductive and3 (P0:Prop) (P1:Prop) (P2:Prop): Prop \def +inductive and3 (P0: Prop) (P1: Prop) (P2: Prop): Prop \def | and3_intro: P0 \to (P1 \to (P2 \to (and3 P0 P1 P2))). -inductive or3 (P0:Prop) (P1:Prop) (P2:Prop): Prop \def +inductive or3 (P0: Prop) (P1: Prop) (P2: Prop): Prop \def | or3_intro0: P0 \to (or3 P0 P1 P2) | or3_intro1: P1 \to (or3 P0 P1 P2) | or3_intro2: P2 \to (or3 P0 P1 P2). -inductive or4 (P0:Prop) (P1:Prop) (P2:Prop) (P3:Prop): Prop \def +inductive or4 (P0: Prop) (P1: Prop) (P2: Prop) (P3: Prop): Prop \def | or4_intro0: P0 \to (or4 P0 P1 P2 P3) | or4_intro1: P1 \to (or4 P0 P1 P2 P3) | or4_intro2: P2 \to (or4 P0 P1 P2 P3) | or4_intro3: P3 \to (or4 P0 P1 P2 P3). -inductive ex3 (A0:Set) (P0:A0 \to Prop) (P1:A0 \to Prop) (P2:A0 \to Prop): -Prop \def +inductive ex3 (A0: Set) (P0: (A0 \to Prop)) (P1: (A0 \to Prop)) (P2: (A0 \to +Prop)): Prop \def | ex3_intro: \forall (x0: A0).((P0 x0) \to ((P1 x0) \to ((P2 x0) \to (ex3 A0 P0 P1 P2)))). -inductive ex4 (A0:Set) (P0:A0 \to Prop) (P1:A0 \to Prop) (P2:A0 \to Prop) -(P3:A0 \to Prop): Prop \def +inductive ex4 (A0: Set) (P0: (A0 \to Prop)) (P1: (A0 \to Prop)) (P2: (A0 \to +Prop)) (P3: (A0 \to Prop)): Prop \def | ex4_intro: \forall (x0: A0).((P0 x0) \to ((P1 x0) \to ((P2 x0) \to ((P3 x0) \to (ex4 A0 P0 P1 P2 P3))))). -inductive ex_2 (A0:Set) (A1:Set) (P0:A0 \to (A1 \to Prop)): Prop \def +inductive ex_2 (A0: Set) (A1: Set) (P0: (A0 \to (A1 \to Prop))): Prop \def | ex_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to (ex_2 A0 A1 P0))). -inductive ex2_2 (A0:Set) (A1:Set) (P0:A0 \to (A1 \to Prop)) (P1:A0 \to (A1 -\to Prop)): Prop \def +inductive ex2_2 (A0: Set) (A1: Set) (P0: (A0 \to (A1 \to Prop))) (P1: (A0 \to +(A1 \to Prop))): Prop \def | ex2_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) \to (ex2_2 A0 A1 P0 P1)))). -inductive ex3_2 (A0:Set) (A1:Set) (P0:A0 \to (A1 \to Prop)) (P1:A0 \to (A1 -\to Prop)) (P2:A0 \to (A1 \to Prop)): Prop \def +inductive ex3_2 (A0: Set) (A1: Set) (P0: (A0 \to (A1 \to Prop))) (P1: (A0 \to +(A1 \to Prop))) (P2: (A0 \to (A1 \to Prop))): Prop \def | ex3_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) \to ((P2 x0 x1) \to (ex3_2 A0 A1 P0 P1 P2))))). -inductive ex4_2 (A0:Set) (A1:Set) (P0:A0 \to (A1 \to Prop)) (P1:A0 \to (A1 -\to Prop)) (P2:A0 \to (A1 \to Prop)) (P3:A0 \to (A1 \to Prop)): Prop \def +inductive ex4_2 (A0: Set) (A1: Set) (P0: (A0 \to (A1 \to Prop))) (P1: (A0 \to +(A1 \to Prop))) (P2: (A0 \to (A1 \to Prop))) (P3: (A0 \to (A1 \to Prop))): +Prop \def | ex4_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) \to ((P2 x0 x1) \to ((P3 x0 x1) \to (ex4_2 A0 A1 P0 P1 P2 P3)))))). -inductive ex_3 (A0:Set) (A1:Set) (A2:Set) (P0:A0 \to (A1 \to (A2 \to Prop))): -Prop \def +inductive ex_3 (A0: Set) (A1: Set) (A2: Set) (P0: (A0 \to (A1 \to (A2 \to +Prop)))): Prop \def | ex_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to (ex_3 A0 A1 A2 P0)))). -inductive ex2_3 (A0:Set) (A1:Set) (A2:Set) (P0:A0 \to (A1 \to (A2 \to Prop))) -(P1:A0 \to (A1 \to (A2 \to Prop))): Prop \def +inductive ex2_3 (A0: Set) (A1: Set) (A2: Set) (P0: (A0 \to (A1 \to (A2 \to +Prop)))) (P1: (A0 \to (A1 \to (A2 \to Prop)))): Prop \def | ex2_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to (ex2_3 A0 A1 A2 P0 P1))))). -inductive ex3_3 (A0:Set) (A1:Set) (A2:Set) (P0:A0 \to (A1 \to (A2 \to Prop))) -(P1:A0 \to (A1 \to (A2 \to Prop))) (P2:A0 \to (A1 \to (A2 \to Prop))): Prop -\def +inductive ex3_3 (A0: Set) (A1: Set) (A2: Set) (P0: (A0 \to (A1 \to (A2 \to +Prop)))) (P1: (A0 \to (A1 \to (A2 \to Prop)))) (P2: (A0 \to (A1 \to (A2 \to +Prop)))): Prop \def | ex3_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to (ex3_3 A0 A1 A2 P0 P1 P2)))))). -inductive ex4_3 (A0:Set) (A1:Set) (A2:Set) (P0:A0 \to (A1 \to (A2 \to Prop))) -(P1:A0 \to (A1 \to (A2 \to Prop))) (P2:A0 \to (A1 \to (A2 \to Prop))) (P3:A0 -\to (A1 \to (A2 \to Prop))): Prop \def +inductive ex4_3 (A0: Set) (A1: Set) (A2: Set) (P0: (A0 \to (A1 \to (A2 \to +Prop)))) (P1: (A0 \to (A1 \to (A2 \to Prop)))) (P2: (A0 \to (A1 \to (A2 \to +Prop)))) (P3: (A0 \to (A1 \to (A2 \to Prop)))): Prop \def | ex4_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to ((P3 x0 x1 x2) \to (ex4_3 A0 A1 A2 P0 P1 P2 P3))))))). -inductive ex3_4 (A0:Set) (A1:Set) (A2:Set) (A3:Set) (P0:A0 \to (A1 \to (A2 -\to (A3 \to Prop)))) (P1:A0 \to (A1 \to (A2 \to (A3 \to Prop)))) (P2:A0 \to -(A1 \to (A2 \to (A3 \to Prop)))): Prop \def +inductive ex3_4 (A0: Set) (A1: Set) (A2: Set) (A3: Set) (P0: (A0 \to (A1 \to +(A2 \to (A3 \to Prop))))) (P1: (A0 \to (A1 \to (A2 \to (A3 \to Prop))))) (P2: +(A0 \to (A1 \to (A2 \to (A3 \to Prop))))): Prop \def | ex3_4_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: A3).((P0 x0 x1 x2 x3) \to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to (ex3_4 A0 A1 A2 A3 P0 P1 P2))))))). -inductive ex4_4 (A0:Set) (A1:Set) (A2:Set) (A3:Set) (P0:A0 \to (A1 \to (A2 -\to (A3 \to Prop)))) (P1:A0 \to (A1 \to (A2 \to (A3 \to Prop)))) (P2:A0 \to -(A1 \to (A2 \to (A3 \to Prop)))) (P3:A0 \to (A1 \to (A2 \to (A3 \to Prop)))): -Prop \def +inductive ex4_4 (A0: Set) (A1: Set) (A2: Set) (A3: Set) (P0: (A0 \to (A1 \to +(A2 \to (A3 \to Prop))))) (P1: (A0 \to (A1 \to (A2 \to (A3 \to Prop))))) (P2: +(A0 \to (A1 \to (A2 \to (A3 \to Prop))))) (P3: (A0 \to (A1 \to (A2 \to (A3 +\to Prop))))): Prop \def | ex4_4_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: A3).((P0 x0 x1 x2 x3) \to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to ((P3 x0 x1 x2 x3) \to (ex4_4 A0 A1 A2 A3 P0 P1 P2 P3)))))))). -inductive ex4_5 (A0:Set) (A1:Set) (A2:Set) (A3:Set) (A4:Set) (P0:A0 \to (A1 -\to (A2 \to (A3 \to (A4 \to Prop))))) (P1:A0 \to (A1 \to (A2 \to (A3 \to (A4 -\to Prop))))) (P2:A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P3:A0 \to -(A1 \to (A2 \to (A3 \to (A4 \to Prop))))): Prop \def +inductive ex4_5 (A0: Set) (A1: Set) (A2: Set) (A3: Set) (A4: Set) (P0: (A0 +\to (A1 \to (A2 \to (A3 \to (A4 \to Prop)))))) (P1: (A0 \to (A1 \to (A2 \to +(A3 \to (A4 \to Prop)))))) (P2: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop)))))) (P3: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop)))))): Prop \def | ex4_5_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 x4) \to ((P1 x0 x1 x2 x3 x4) \to ((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 x4) \to (ex4_5 A0 A1 A2 A3 A4 P0 P1 P2 P3))))))))). -inductive ex5_5 (A0:Set) (A1:Set) (A2:Set) (A3:Set) (A4:Set) (P0:A0 \to (A1 -\to (A2 \to (A3 \to (A4 \to Prop))))) (P1:A0 \to (A1 \to (A2 \to (A3 \to (A4 -\to Prop))))) (P2:A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P3:A0 \to -(A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P4:A0 \to (A1 \to (A2 \to (A3 \to -(A4 \to Prop))))): Prop \def +inductive ex5_5 (A0: Set) (A1: Set) (A2: Set) (A3: Set) (A4: Set) (P0: (A0 +\to (A1 \to (A2 \to (A3 \to (A4 \to Prop)))))) (P1: (A0 \to (A1 \to (A2 \to +(A3 \to (A4 \to Prop)))))) (P2: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop)))))) (P3: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop)))))) (P4: (A0 +\to (A1 \to (A2 \to (A3 \to (A4 \to Prop)))))): Prop \def | ex5_5_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 x4) \to ((P1 x0 x1 x2 x3 x4) \to ((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 x4) \to ((P4 x0 x1 x2 x3 x4) \to (ex5_5 A0 A1 A2 A3 A4 P0 P1 P2 P3 P4)))))))))). -inductive ex6_6 (A0:Set) (A1:Set) (A2:Set) (A3:Set) (A4:Set) (A5:Set) (P0:A0 -\to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))) (P1:A0 \to (A1 \to (A2 -\to (A3 \to (A4 \to (A5 \to Prop)))))) (P2:A0 \to (A1 \to (A2 \to (A3 \to (A4 -\to (A5 \to Prop)))))) (P3:A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to -Prop)))))) (P4:A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))) -(P5:A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))): Prop \def +inductive ex6_6 (A0: Set) (A1: Set) (A2: Set) (A3: Set) (A4: Set) (A5: Set) +(P0: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop))))))) (P1: (A0 \to +(A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop))))))) (P2: (A0 \to (A1 \to (A2 +\to (A3 \to (A4 \to (A5 \to Prop))))))) (P3: (A0 \to (A1 \to (A2 \to (A3 \to +(A4 \to (A5 \to Prop))))))) (P4: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 +\to Prop))))))) (P5: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to +Prop))))))): Prop \def | ex6_6_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: A3).(\forall (x4: A4).(\forall (x5: A5).((P0 x0 x1 x2 x3 x4 x5) \to ((P1 x0 x1 x2 x3 x4 x5) \to ((P2 x0 x1 x2 x3 x4 x5) \to ((P3 x0 x1 x2 x3 x4 x5) \to ((P4 x0 x1 x2 x3 x4 x5) \to ((P5 x0 x1 x2 x3 x4 x5) \to (ex6_6 A0 A1 A2 A3 A4 A5 P0 P1 P2 P3 P4 P5)))))))))))). -inductive ex6_7 (A0:Set) (A1:Set) (A2:Set) (A3:Set) (A4:Set) (A5:Set) -(A6:Set) (P0:A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to -Prop))))))) (P1:A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to -Prop))))))) (P2:A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to -Prop))))))) (P3:A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to -Prop))))))) (P4:A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to -Prop))))))) (P5:A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to -Prop))))))): Prop \def +inductive ex6_7 (A0: Set) (A1: Set) (A2: Set) (A3: Set) (A4: Set) (A5: Set) +(A6: Set) (P0: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to +Prop)))))))) (P1: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to +Prop)))))))) (P2: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to +Prop)))))))) (P3: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to +Prop)))))))) (P4: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to +Prop)))))))) (P5: (A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to +Prop)))))))): Prop \def | ex6_7_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: A3).(\forall (x4: A4).(\forall (x5: A5).(\forall (x6: A6).((P0 x0 x1 x2 x3 x4 x5 x6) \to ((P1 x0 x1 x2 x3 x4 x5 x6) \to ((P2 x0 x1 x2 x3 x4 x5 x6) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma index 675dbfe7c..8642561d2 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma @@ -18,4407 +18,3 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta". include "LambdaDelta/theory.ma". -theorem bind_dec_not: - \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) (not (eq B b1 b2)))) -\def - \lambda (b1: B).(\lambda (b2: B).(let H_x \def (terms_props__bind_dec b1 b2) -in (let H \def H_x in (or_ind (eq B b1 b2) ((eq B b1 b2) \to (\forall (P: -Prop).P)) (or (eq B b1 b2) ((eq B b1 b2) \to False)) (\lambda (H0: (eq B b1 -b2)).(or_introl (eq B b1 b2) ((eq B b1 b2) \to False) H0)) (\lambda (H0: -(((eq B b1 b2) \to (\forall (P: Prop).P)))).(or_intror (eq B b1 b2) ((eq B b1 -b2) \to False) (\lambda (H1: (eq B b1 b2)).(H0 H1 False)))) H)))). - -definition TApp: - TList \to (T \to TList) -\def - let rec TApp (ts: TList) on ts: (T \to TList) \def (\lambda (v: T).(match ts -with [TNil \Rightarrow (TCons v TNil) | (TCons t ts0) \Rightarrow (TCons t -(TApp ts0 v))])) in TApp. - -definition tslen: - TList \to nat -\def - let rec tslen (ts: TList) on ts: nat \def (match ts with [TNil \Rightarrow O -| (TCons _ ts0) \Rightarrow (S (tslen ts0))]) in tslen. - -definition tslt: - TList \to (TList \to Prop) -\def - \lambda (ts1: TList).(\lambda (ts2: TList).(lt (tslen ts1) (tslen ts2))). - -theorem tslt_wf__q_ind: - \forall (P: ((TList \to Prop))).(((\forall (n: nat).((\lambda (P0: ((TList -\to Prop))).(\lambda (n0: nat).(\forall (ts: TList).((eq nat (tslen ts) n0) -\to (P0 ts))))) P n))) \to (\forall (ts: TList).(P ts))) -\def - let Q \def (\lambda (P: ((TList \to Prop))).(\lambda (n: nat).(\forall (ts: -TList).((eq nat (tslen ts) n) \to (P ts))))) in (\lambda (P: ((TList \to -Prop))).(\lambda (H: ((\forall (n: nat).(\forall (ts: TList).((eq nat (tslen -ts) n) \to (P ts)))))).(\lambda (ts: TList).(H (tslen ts) ts (refl_equal nat -(tslen ts)))))). - -theorem tslt_wf_ind: - \forall (P: ((TList \to Prop))).(((\forall (ts2: TList).(((\forall (ts1: -TList).((tslt ts1 ts2) \to (P ts1)))) \to (P ts2)))) \to (\forall (ts: -TList).(P ts))) -\def - let Q \def (\lambda (P: ((TList \to Prop))).(\lambda (n: nat).(\forall (ts: -TList).((eq nat (tslen ts) n) \to (P ts))))) in (\lambda (P: ((TList \to -Prop))).(\lambda (H: ((\forall (ts2: TList).(((\forall (ts1: TList).((lt -(tslen ts1) (tslen ts2)) \to (P ts1)))) \to (P ts2))))).(\lambda (ts: -TList).(tslt_wf__q_ind (\lambda (t: TList).(P t)) (\lambda (n: -nat).(lt_wf_ind n (Q (\lambda (t: TList).(P t))) (\lambda (n0: nat).(\lambda -(H0: ((\forall (m: nat).((lt m n0) \to (Q (\lambda (t: TList).(P t)) -m))))).(\lambda (ts0: TList).(\lambda (H1: (eq nat (tslen ts0) n0)).(let H2 -\def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall (m: nat).((lt m n1) \to -(\forall (ts1: TList).((eq nat (tslen ts1) m) \to (P ts1)))))) H0 (tslen ts0) -H1) in (H ts0 (\lambda (ts1: TList).(\lambda (H3: (lt (tslen ts1) (tslen -ts0))).(H2 (tslen ts1) H3 ts1 (refl_equal nat (tslen ts1))))))))))))) ts)))). - -theorem theads_tapp: - \forall (k: K).(\forall (vs: TList).(\forall (v: T).(\forall (t: T).(eq T -(THeads k (TApp vs v) t) (THeads k vs (THead k v t)))))) -\def - \lambda (k: K).(\lambda (vs: TList).(TList_ind (\lambda (t: TList).(\forall -(v: T).(\forall (t0: T).(eq T (THeads k (TApp t v) t0) (THeads k t (THead k v -t0)))))) (\lambda (v: T).(\lambda (t: T).(refl_equal T (THead k v t)))) -(\lambda (t: T).(\lambda (t0: TList).(\lambda (H: ((\forall (v: T).(\forall -(t1: T).(eq T (THeads k (TApp t0 v) t1) (THeads k t0 (THead k v -t1))))))).(\lambda (v: T).(\lambda (t1: T).(eq_ind_r T (THeads k t0 (THead k -v t1)) (\lambda (t2: T).(eq T (THead k t t2) (THead k t (THeads k t0 (THead k -v t1))))) (refl_equal T (THead k t (THeads k t0 (THead k v t1)))) (THeads k -(TApp t0 v) t1) (H v t1))))))) vs)). - -theorem tcons_tapp_ex: - \forall (ts1: TList).(\forall (t1: T).(ex2_2 TList T (\lambda (ts2: -TList).(\lambda (t2: T).(eq TList (TCons t1 ts1) (TApp ts2 t2)))) (\lambda -(ts2: TList).(\lambda (_: T).(eq nat (tslen ts1) (tslen ts2)))))) -\def - \lambda (ts1: TList).(TList_ind (\lambda (t: TList).(\forall (t1: T).(ex2_2 -TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t1 t) (TApp -ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t) (tslen -ts2))))))) (\lambda (t1: T).(ex2_2_intro TList T (\lambda (ts2: -TList).(\lambda (t2: T).(eq TList (TCons t1 TNil) (TApp ts2 t2)))) (\lambda -(ts2: TList).(\lambda (_: T).(eq nat O (tslen ts2)))) TNil t1 (refl_equal -TList (TApp TNil t1)) (refl_equal nat (tslen TNil)))) (\lambda (t: -T).(\lambda (t0: TList).(\lambda (H: ((\forall (t1: T).(ex2_2 TList T -(\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t1 t0) (TApp ts2 -t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t0) (tslen -ts2)))))))).(\lambda (t1: T).(let H_x \def (H t) in (let H0 \def H_x in -(ex2_2_ind TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t -t0) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t0) -(tslen ts2)))) (ex2_2 TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq -TList (TCons t1 (TCons t t0)) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda -(_: T).(eq nat (S (tslen t0)) (tslen ts2))))) (\lambda (x0: TList).(\lambda -(x1: T).(\lambda (H1: (eq TList (TCons t t0) (TApp x0 x1))).(\lambda (H2: (eq -nat (tslen t0) (tslen x0))).(eq_ind_r TList (TApp x0 x1) (\lambda (t2: -TList).(ex2_2 TList T (\lambda (ts2: TList).(\lambda (t3: T).(eq TList (TCons -t1 t2) (TApp ts2 t3)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (S -(tslen t0)) (tslen ts2)))))) (eq_ind_r nat (tslen x0) (\lambda (n: -nat).(ex2_2 TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons -t1 (TApp x0 x1)) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq -nat (S n) (tslen ts2)))))) (ex2_2_intro TList T (\lambda (ts2: -TList).(\lambda (t2: T).(eq TList (TCons t1 (TApp x0 x1)) (TApp ts2 t2)))) -(\lambda (ts2: TList).(\lambda (_: T).(eq nat (S (tslen x0)) (tslen ts2)))) -(TCons t1 x0) x1 (refl_equal TList (TApp (TCons t1 x0) x1)) (refl_equal nat -(tslen (TCons t1 x0)))) (tslen t0) H2) (TCons t t0) H1))))) H0))))))) ts1). - -theorem tlist_ind_rew: - \forall (P: ((TList \to Prop))).((P TNil) \to (((\forall (ts: -TList).(\forall (t: T).((P ts) \to (P (TApp ts t)))))) \to (\forall (ts: -TList).(P ts)))) -\def - \lambda (P: ((TList \to Prop))).(\lambda (H: (P TNil)).(\lambda (H0: -((\forall (ts: TList).(\forall (t: T).((P ts) \to (P (TApp ts -t))))))).(\lambda (ts: TList).(tslt_wf_ind (\lambda (t: TList).(P t)) -(\lambda (ts2: TList).(TList_ind (\lambda (t: TList).(((\forall (ts1: -TList).((tslt ts1 t) \to (P ts1)))) \to (P t))) (\lambda (_: ((\forall (ts1: -TList).((tslt ts1 TNil) \to (P ts1))))).H) (\lambda (t: T).(\lambda (t0: -TList).(\lambda (_: ((((\forall (ts1: TList).((tslt ts1 t0) \to (P ts1)))) -\to (P t0)))).(\lambda (H2: ((\forall (ts1: TList).((tslt ts1 (TCons t t0)) -\to (P ts1))))).(let H_x \def (tcons_tapp_ex t0 t) in (let H3 \def H_x in -(ex2_2_ind TList T (\lambda (ts3: TList).(\lambda (t2: T).(eq TList (TCons t -t0) (TApp ts3 t2)))) (\lambda (ts3: TList).(\lambda (_: T).(eq nat (tslen t0) -(tslen ts3)))) (P (TCons t t0)) (\lambda (x0: TList).(\lambda (x1: -T).(\lambda (H4: (eq TList (TCons t t0) (TApp x0 x1))).(\lambda (H5: (eq nat -(tslen t0) (tslen x0))).(eq_ind_r TList (TApp x0 x1) (\lambda (t1: TList).(P -t1)) (H0 x0 x1 (H2 x0 (eq_ind nat (tslen t0) (\lambda (n: nat).(lt n (tslen -(TCons t t0)))) (le_n (tslen (TCons t t0))) (tslen x0) H5))) (TCons t t0) -H4))))) H3))))))) ts2)) ts)))). - -theorem lifts_tapp: - \forall (h: nat).(\forall (d: nat).(\forall (v: T).(\forall (vs: TList).(eq -TList (lifts h d (TApp vs v)) (TApp (lifts h d vs) (lift h d v)))))) -\def - \lambda (h: nat).(\lambda (d: nat).(\lambda (v: T).(\lambda (vs: -TList).(TList_ind (\lambda (t: TList).(eq TList (lifts h d (TApp t v)) (TApp -(lifts h d t) (lift h d v)))) (refl_equal TList (TCons (lift h d v) TNil)) -(\lambda (t: T).(\lambda (t0: TList).(\lambda (H: (eq TList (lifts h d (TApp -t0 v)) (TApp (lifts h d t0) (lift h d v)))).(eq_ind_r TList (TApp (lifts h d -t0) (lift h d v)) (\lambda (t1: TList).(eq TList (TCons (lift h d t) t1) -(TCons (lift h d t) (TApp (lifts h d t0) (lift h d v))))) (refl_equal TList -(TCons (lift h d t) (TApp (lifts h d t0) (lift h d v)))) (lifts h d (TApp t0 -v)) H)))) vs)))). - -theorem pr2_change: - \forall (b: B).((not (eq B b Abbr)) \to (\forall (c: C).(\forall (v1: -T).(\forall (t1: T).(\forall (t2: T).((pr2 (CHead c (Bind b) v1) t1 t2) \to -(\forall (v2: T).(pr2 (CHead c (Bind b) v2) t1 t2)))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abbr))).(\lambda (c: C).(\lambda -(v1: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr2 (CHead c (Bind -b) v1) t1 t2)).(\lambda (v2: T).(insert_eq C (CHead c (Bind b) v1) (\lambda -(c0: C).(pr2 c0 t1 t2)) (pr2 (CHead c (Bind b) v2) t1 t2) (\lambda (y: -C).(\lambda (H1: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: -T).(\lambda (t0: T).((eq C c0 (CHead c (Bind b) v1)) \to (pr2 (CHead c (Bind -b) v2) t t0))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda -(H2: (pr0 t3 t4)).(\lambda (_: (eq C c0 (CHead c (Bind b) v1))).(pr2_free -(CHead c (Bind b) v2) t3 t4 H2)))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H2: (getl i c0 (CHead d (Bind -Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 -t4)).(\lambda (t: T).(\lambda (H4: (subst0 i u t4 t)).(\lambda (H5: (eq C c0 -(CHead c (Bind b) v1))).(let H6 \def (eq_ind C c0 (\lambda (c1: C).(getl i c1 -(CHead d (Bind Abbr) u))) H2 (CHead c (Bind b) v1) H5) in (nat_ind (\lambda -(n: nat).((getl n (CHead c (Bind b) v1) (CHead d (Bind Abbr) u)) \to ((subst0 -n u t4 t) \to (pr2 (CHead c (Bind b) v2) t3 t)))) (\lambda (H7: (getl O -(CHead c (Bind b) v1) (CHead d (Bind Abbr) u))).(\lambda (H8: (subst0 O u t4 -t)).(let H9 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) -(CHead d (Bind Abbr) u) (CHead c (Bind b) v1) (clear_gen_bind b c (CHead d -(Bind Abbr) u) v1 (getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) -H7))) in ((let H10 \def (f_equal C B (\lambda (e: C).(match e in C return -(\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) -\Rightarrow (match k in K return (\lambda (_: K).B) with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) -(CHead c (Bind b) v1) (clear_gen_bind b c (CHead d (Bind Abbr) u) v1 -(getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) H7))) in ((let H11 -\def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) -with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d -(Bind Abbr) u) (CHead c (Bind b) v1) (clear_gen_bind b c (CHead d (Bind Abbr) -u) v1 (getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) H7))) in -(\lambda (H12: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H14 \def (eq_ind -T u (\lambda (t0: T).(subst0 O t0 t4 t)) H8 v1 H11) in (let H15 \def -(eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abbr))) H Abbr H12) in (eq_ind B -Abbr (\lambda (b0: B).(pr2 (CHead c (Bind b0) v2) t3 t)) (let H16 \def (match -(H15 (refl_equal B Abbr)) in False return (\lambda (_: False).(pr2 (CHead c -(Bind Abbr) v2) t3 t)) with []) in H16) b H12)))))) H10)) H9)))) (\lambda -(i0: nat).(\lambda (_: (((getl i0 (CHead c (Bind b) v1) (CHead d (Bind Abbr) -u)) \to ((subst0 i0 u t4 t) \to (pr2 (CHead c (Bind b) v2) t3 t))))).(\lambda -(H7: (getl (S i0) (CHead c (Bind b) v1) (CHead d (Bind Abbr) u))).(\lambda -(H8: (subst0 (S i0) u t4 t)).(pr2_delta (CHead c (Bind b) v2) d u (S i0) -(getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) (getl_gen_S (Bind b) c -(CHead d (Bind Abbr) u) v1 i0 H7) v2) t3 t4 H3 t H8))))) i H6 H4))))))))))))) -y t1 t2 H1))) H0)))))))). - -theorem pr3_gen_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u1: -T).(\forall (t1: T).(\forall (x: T).((pr3 c (THead (Bind b) u1 t1) x) \to (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind b) u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr3 (CHead c (Bind b) u1) t1 t2)))) (pr3 (CHead c (Bind -b) u1) t1 (lift (S O) O x))))))))) -\def - \lambda (b: B).(B_ind (\lambda (b0: B).((not (eq B b0 Abst)) \to (\forall -(c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c (THead (Bind -b0) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x -(THead (Bind b0) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b0) u1) t1 t2)))) (pr3 -(CHead c (Bind b0) u1) t1 (lift (S O) O x)))))))))) (\lambda (_: (not (eq B -Abbr Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: -T).(\lambda (H0: (pr3 c (THead (Bind Abbr) u1 t1) x)).(let H1 \def -(pr3_gen_abbr c u1 t1 x H0) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) -u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) (or (ex3_2 T -T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) -t1 (lift (S O) O x))) (\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 -c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 -t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind -Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))) (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) -t1 (lift (S O) O x))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T x -(THead (Bind Abbr) x0 x1))).(\lambda (H4: (pr3 c u1 x0)).(\lambda (H5: (pr3 -(CHead c (Bind Abbr) u1) t1 x1)).(or_introl (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S -O) O x)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead -(Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))) x0 x1 -H3 H4 H5))))))) H2)) (\lambda (H2: (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S -O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x -(THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 -(CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) H2)) H1)))))))) (\lambda (H: -(not (eq B Abst Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: -T).(\lambda (x: T).(\lambda (_: (pr3 c (THead (Bind Abst) u1 t1) x)).(let H1 -\def (match (H (refl_equal B Abst)) in False return (\lambda (_: False).(or -(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr3 (CHead c (Bind Abst) u1) t1 t2)))) (pr3 (CHead c -(Bind Abst) u1) t1 (lift (S O) O x)))) with []) in H1))))))) (\lambda (_: -(not (eq B Void Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: -T).(\lambda (x: T).(\lambda (H0: (pr3 c (THead (Bind Void) u1 t1) x)).(let H1 -\def (pr3_gen_void c u1 t1 x H0) in (or_ind (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall -(b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t1 t2)))))) (pr3 (CHead c -(Bind Void) u1) t1 (lift (S O) O x)) (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) -u1) t1 t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x))) (\lambda -(H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) -u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) -u) t1 t2))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x -(THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead -c (Bind b0) u) t1 t2))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 -c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 -t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H3: (eq T x (THead (Bind Void) x0 -x1))).(\lambda (H4: (pr3 c u1 x0)).(\lambda (H5: ((\forall (b0: B).(\forall -(u: T).(pr3 (CHead c (Bind b0) u) t1 x1))))).(or_introl (ex3_2 T T (\lambda -(u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind Void) u1) t1 t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S -O) O x)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead -(Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 t2))) x0 x1 -H3 H4 (H5 Void u1)))))))) H2)) (\lambda (H2: (pr3 (CHead c (Bind Void) u1) t1 -(lift (S O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 -c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 -t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x)) H2)) H1)))))))) b). - -theorem pr3_iso_appls_abbr: - \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) w)) \to (\forall (vs: TList).(let u1 \def (THeads (Flat -Appl) vs (TLRef i)) in (\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to -(\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) vs (lift (S i) O w)) -u2)))))))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (vs: TList).(TList_ind -(\lambda (t: TList).(let u1 \def (THeads (Flat Appl) t (TLRef i)) in (\forall -(u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to -(pr3 c (THeads (Flat Appl) t (lift (S i) O w)) u2)))))) (\lambda (u2: -T).(\lambda (H0: (pr3 c (TLRef i) u2)).(\lambda (H1: (((iso (TLRef i) u2) \to -(\forall (P: Prop).P)))).(let H2 \def (pr3_gen_lref c u2 i H0) in (or_ind (eq -T u2 (TLRef i)) (ex3_3 C T T (\lambda (d0: C).(\lambda (u: T).(\lambda (_: -T).(getl i c (CHead d0 (Bind Abbr) u))))) (\lambda (d0: C).(\lambda (u: -T).(\lambda (v: T).(pr3 d0 u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(v: T).(eq T u2 (lift (S i) O v)))))) (pr3 c (lift (S i) O w) u2) (\lambda -(H3: (eq T u2 (TLRef i))).(let H4 \def (eq_ind T u2 (\lambda (t: T).((iso -(TLRef i) t) \to (\forall (P: Prop).P))) H1 (TLRef i) H3) in (eq_ind_r T -(TLRef i) (\lambda (t: T).(pr3 c (lift (S i) O w) t)) (H4 (iso_refl (TLRef -i)) (pr3 c (lift (S i) O w) (TLRef i))) u2 H3))) (\lambda (H3: (ex3_3 C T T -(\lambda (d0: C).(\lambda (u: T).(\lambda (_: T).(getl i c (CHead d0 (Bind -Abbr) u))))) (\lambda (d0: C).(\lambda (u: T).(\lambda (v: T).(pr3 d0 u v)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T u2 (lift (S i) O -v))))))).(ex3_3_ind C T T (\lambda (d0: C).(\lambda (u: T).(\lambda (_: -T).(getl i c (CHead d0 (Bind Abbr) u))))) (\lambda (d0: C).(\lambda (u: -T).(\lambda (v: T).(pr3 d0 u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(v: T).(eq T u2 (lift (S i) O v))))) (pr3 c (lift (S i) O w) u2) (\lambda -(x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H4: (getl i c (CHead x0 -(Bind Abbr) x1))).(\lambda (H5: (pr3 x0 x1 x2)).(\lambda (H6: (eq T u2 (lift -(S i) O x2))).(let H7 \def (eq_ind T u2 (\lambda (t: T).((iso (TLRef i) t) -\to (\forall (P: Prop).P))) H1 (lift (S i) O x2) H6) in (eq_ind_r T (lift (S -i) O x2) (\lambda (t: T).(pr3 c (lift (S i) O w) t)) (let H8 \def (eq_ind C -(CHead d (Bind Abbr) w) (\lambda (c0: C).(getl i c c0)) H (CHead x0 (Bind -Abbr) x1) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x0 (Bind Abbr) x1) -H4)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e in C return -(\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow -c0])) (CHead d (Bind Abbr) w) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d -(Bind Abbr) w) i H (CHead x0 (Bind Abbr) x1) H4)) in ((let H10 \def (f_equal -C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) -\Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) w) (CHead -x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x0 (Bind -Abbr) x1) H4)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 -(\lambda (t: T).(getl i c (CHead x0 (Bind Abbr) t))) H8 w H10) in (let H13 -\def (eq_ind_r T x1 (\lambda (t: T).(pr3 x0 t x2)) H5 w H10) in (let H14 \def -(eq_ind_r C x0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) w))) H12 d -H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c0: C).(pr3 c0 w x2)) H13 d -H11) in (pr3_lift c d (S i) O (getl_drop Abbr c d w i H14) w x2 H15))))))) -H9))) u2 H6)))))))) H3)) H2))))) (\lambda (t: T).(\lambda (t0: -TList).(\lambda (H0: ((\forall (u2: T).((pr3 c (THeads (Flat Appl) t0 (TLRef -i)) u2) \to ((((iso (THeads (Flat Appl) t0 (TLRef i)) u2) \to (\forall (P: -Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (lift (S i) O w)) -u2)))))).(\lambda (u2: T).(\lambda (H1: (pr3 c (THead (Flat Appl) t (THeads -(Flat Appl) t0 (TLRef i))) u2)).(\lambda (H2: (((iso (THead (Flat Appl) t -(THeads (Flat Appl) t0 (TLRef i))) u2) \to (\forall (P: Prop).P)))).(let H3 -\def (pr3_gen_appl c t (THeads (Flat Appl) t0 (TLRef i)) u2 H1) in (or3_ind -(ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 -t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: -T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) t2)))) (ex4_4 T -T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 -c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c (THead (Flat Appl) t -(THeads (Flat Appl) t0 (lift (S i) O w))) u2) (\lambda (H4: (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: -T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) t2))))).(ex3_2_ind T T (\lambda -(u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c -(THeads (Flat Appl) t0 (TLRef i)) t2))) (pr3 c (THead (Flat Appl) t (THeads -(Flat Appl) t0 (lift (S i) O w))) u2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H5: (eq T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c t -x0)).(\lambda (_: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) x1)).(let H8 \def -(eq_ind T u2 (\lambda (t1: T).((iso (THead (Flat Appl) t (THeads (Flat Appl) -t0 (TLRef i))) t1) \to (\forall (P: Prop).P))) H2 (THead (Flat Appl) x0 x1) -H5) in (eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t1: T).(pr3 c (THead -(Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) t1)) (H8 (iso_head t -x0 (THeads (Flat Appl) t0 (TLRef i)) x1 (Flat Appl)) (pr3 c (THead (Flat -Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) (THead (Flat Appl) x0 x1))) -u2 H5))))))) H4)) (\lambda (H4: (ex4_4 T T T T (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t -u3))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T -T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 -c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O -w))) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (H5: (pr3 c (THead (Bind Abbr) x2 x3) u2)).(\lambda (H6: (pr3 c t -x2)).(\lambda (H7: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind -Abst) x0 x1))).(\lambda (H8: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c -(Bind b) u) x1 x3))))).(pr3_t (THead (Bind Abbr) t x1) (THead (Flat Appl) t -(THeads (Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Flat Appl) t -(THead (Bind Abst) x0 x1)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift -(S i) O w))) c (pr3_thin_dx c (THeads (Flat Appl) t0 (lift (S i) O w)) (THead -(Bind Abst) x0 x1) (H0 (THead (Bind Abst) x0 x1) H7 (\lambda (H9: (iso -(THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) x0 x1))).(\lambda (P: -Prop).(iso_flats_lref_bind_false Appl Abst i x0 x1 t0 H9 P)))) t Appl) (THead -(Bind Abbr) t x1) (pr3_pr2 c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) -(THead (Bind Abbr) t x1) (pr2_free c (THead (Flat Appl) t (THead (Bind Abst) -x0 x1)) (THead (Bind Abbr) t x1) (pr0_beta x0 t t (pr0_refl t) x1 x1 -(pr0_refl x1))))) u2 (pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) t -x1) c (pr3_head_12 c t x2 H6 (Bind Abbr) x1 x3 (H8 Abbr x2)) u2 H5)))))))))) -H4)) (\lambda (H4: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind -B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 -(CHead c (Bind b) y2) z1 z2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat -Appl) t0 (lift (S i) O w))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda -(x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H5: (not -(eq B x0 Abst))).(\lambda (H6: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) -(THead (Bind x0) x1 x2))).(\lambda (H7: (pr3 c (THead (Bind x0) x5 (THead -(Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (H8: (pr3 c t x4)).(\lambda -(H9: (pr3 c x1 x5)).(\lambda (H10: (pr3 (CHead c (Bind x0) x5) x2 x3)).(pr3_t -(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (THead (Flat -Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Bind x0) -x1 (THead (Flat Appl) (lift (S O) O t) x2)) (THead (Flat Appl) t (THeads -(Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Flat Appl) t (THead (Bind -x0) x1 x2)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) c -(pr3_thin_dx c (THeads (Flat Appl) t0 (lift (S i) O w)) (THead (Bind x0) x1 -x2) (H0 (THead (Bind x0) x1 x2) H6 (\lambda (H11: (iso (THeads (Flat Appl) t0 -(TLRef i)) (THead (Bind x0) x1 x2))).(\lambda (P: -Prop).(iso_flats_lref_bind_false Appl x0 i x1 x2 t0 H11 P)))) t Appl) (THead -(Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr3_pr2 c (THead (Flat -Appl) t (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) (lift -(S O) O t) x2)) (pr2_free c (THead (Flat Appl) t (THead (Bind x0) x1 x2)) -(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr0_upsilon x0 -H5 t t (pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2))))) (THead (Bind -x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (pr3_head_12 c x1 x1 -(pr3_refl c x1) (Bind x0) (THead (Flat Appl) (lift (S O) O t) x2) (THead -(Flat Appl) (lift (S O) O x4) x2) (pr3_head_12 (CHead c (Bind x0) x1) (lift -(S O) O t) (lift (S O) O x4) (pr3_lift (CHead c (Bind x0) x1) c (S O) O -(drop_drop (Bind x0) O c c (drop_refl c) x1) t x4 H8) (Flat Appl) x2 x2 -(pr3_refl (CHead (CHead c (Bind x0) x1) (Flat Appl) (lift (S O) O x4)) x2)))) -u2 (pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) -(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) c (pr3_head_12 -c x1 x5 H9 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) (THead (Flat -Appl) (lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H10 -(lift (S O) O x4) Appl)) u2 H7)))))))))))))) H4)) H3)))))))) vs)))))). - -theorem pr3_iso_appl_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (v1: T).(\forall (v2: -T).(\forall (t: T).(let u1 \def (THead (Flat Appl) v1 (THead (Bind b) v2 t)) -in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to -(\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) v2 (THead (Flat Appl) -(lift (S O) O v1) t)) u2)))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (v1: T).(\lambda -(v2: T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H0: (pr3 c -(THead (Flat Appl) v1 (THead (Bind b) v2 t)) u2)).(\lambda (H1: (((iso (THead -(Flat Appl) v1 (THead (Bind b) v2 t)) u2) \to (\forall (P: Prop).P)))).(let -H2 \def (pr3_gen_appl c v1 (THead (Bind b) v2 t) u2 H0) in (or3_ind (ex3_2 T -T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda -(t2: T).(pr3 c (THead (Bind b) v2 t) t2)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c v1 u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) z1 -t2)))))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) -(\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind b0) y1 -z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: -T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) y2 (THead (Flat -Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b0: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2)))))))) (pr3 c (THead (Bind b) v2 -(THead (Flat Appl) (lift (S O) O v1) t)) u2) (\lambda (H3: (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda -(t2: T).(pr3 c (THead (Bind b) v2 t) t2))))).(ex3_2_ind T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c -(THead (Bind b) v2 t) t2))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) -(lift (S O) O v1) t)) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq -T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c v1 x0)).(\lambda (_: -(pr3 c (THead (Bind b) v2 t) x1)).(let H7 \def (eq_ind T u2 (\lambda (t0: -T).((iso (THead (Flat Appl) v1 (THead (Bind b) v2 t)) t0) \to (\forall (P: -Prop).P))) H1 (THead (Flat Appl) x0 x1) H4) in (eq_ind_r T (THead (Flat Appl) -x0 x1) (\lambda (t0: T).(pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S -O) O v1) t)) t0)) (H7 (iso_head v1 x0 (THead (Bind b) v2 t) x1 (Flat Appl)) -(pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead -(Flat Appl) x0 x1))) u2 H4))))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda -(_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c v1 u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) z1 -t2))))))))).(ex4_4_ind T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))))) -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THead (Bind b) v2 t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: -T).(pr3 (CHead c (Bind b0) u) z1 t2))))))) (pr3 c (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O v1) t)) u2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (pr3 c (THead (Bind Abbr) -x2 x3) u2)).(\lambda (H5: (pr3 c v1 x2)).(\lambda (H6: (pr3 c (THead (Bind b) -v2 t) (THead (Bind Abst) x0 x1))).(\lambda (H7: ((\forall (b0: B).(\forall -(u: T).(pr3 (CHead c (Bind b0) u) x1 x3))))).(pr3_t (THead (Bind Abbr) x2 x3) -(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) c (let H_x \def -(pr3_gen_bind b H c v2 t (THead (Bind Abst) x0 x1) H6) in (let H8 \def H_x in -(or_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind Abst) -x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v2 -u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b) v2) t t2)))) -(pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind Abst) x0 x1))) (pr3 c -(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind -Abbr) x2 x3)) (\lambda (H9: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq -T (THead (Bind Abst) x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind b) v2) t t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: -T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind b) v2) t t2))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) -(lift (S O) O v1) t)) (THead (Bind Abbr) x2 x3)) (\lambda (x4: T).(\lambda -(x5: T).(\lambda (H10: (eq T (THead (Bind Abst) x0 x1) (THead (Bind b) x4 -x5))).(\lambda (H11: (pr3 c v2 x4)).(\lambda (H12: (pr3 (CHead c (Bind b) v2) -t x5)).(let H13 \def (f_equal T B (\lambda (e: T).(match e in T return -(\lambda (_: T).B) with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow -Abst | (THead k _ _) \Rightarrow (match k in K return (\lambda (_: K).B) with -[(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abst])])) (THead (Bind Abst) -x0 x1) (THead (Bind b) x4 x5) H10) in ((let H14 \def (f_equal T T (\lambda -(e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 -| (TLRef _) \Rightarrow x0 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind -Abst) x0 x1) (THead (Bind b) x4 x5) H10) in ((let H15 \def (f_equal T T -(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t0) \Rightarrow t0])) -(THead (Bind Abst) x0 x1) (THead (Bind b) x4 x5) H10) in (\lambda (H16: (eq T -x0 x4)).(\lambda (H17: (eq B Abst b)).(let H18 \def (eq_ind_r T x5 (\lambda -(t0: T).(pr3 (CHead c (Bind b) v2) t t0)) H12 x1 H15) in (let H19 \def -(eq_ind_r T x4 (\lambda (t0: T).(pr3 c v2 t0)) H11 x0 H16) in (let H20 \def -(eq_ind_r B b (\lambda (b0: B).(pr3 (CHead c (Bind b0) v2) t x1)) H18 Abst -H17) in (let H21 \def (eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abst))) H -Abst H17) in (eq_ind B Abst (\lambda (b0: B).(pr3 c (THead (Bind b0) v2 -(THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind Abbr) x2 x3))) (let H22 -\def (match (H21 (refl_equal B Abst)) in False return (\lambda (_: -False).(pr3 c (THead (Bind Abst) v2 (THead (Flat Appl) (lift (S O) O v1) t)) -(THead (Bind Abbr) x2 x3))) with []) in H22) b H17)))))))) H14)) H13))))))) -H9)) (\lambda (H9: (pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind -Abst) x0 x1)))).(pr3_t (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O -x2) (lift (S O) O (THead (Bind Abst) x0 x1)))) (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O v1) t)) c (pr3_head_2 c v2 (THead (Flat Appl) (lift -(S O) O v1) t) (THead (Flat Appl) (lift (S O) O x2) (lift (S O) O (THead -(Bind Abst) x0 x1))) (Bind b) (pr3_flat (CHead c (Bind b) v2) (lift (S O) O -v1) (lift (S O) O x2) (pr3_lift (CHead c (Bind b) v2) c (S O) O (drop_drop -(Bind b) O c c (drop_refl c) v2) v1 x2 H5) t (lift (S O) O (THead (Bind Abst) -x0 x1)) H9 Appl)) (THead (Bind Abbr) x2 x3) (eq_ind T (lift (S O) O (THead -(Flat Appl) x2 (THead (Bind Abst) x0 x1))) (\lambda (t0: T).(pr3 c (THead -(Bind b) v2 t0) (THead (Bind Abbr) x2 x3))) (pr3_sing c (THead (Bind Abbr) x2 -x1) (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) x2 (THead (Bind Abst) -x0 x1)))) (pr2_free c (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) x2 -(THead (Bind Abst) x0 x1)))) (THead (Bind Abbr) x2 x1) (pr0_zeta b H (THead -(Flat Appl) x2 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) x2 x1) (pr0_beta -x0 x2 x2 (pr0_refl x2) x1 x1 (pr0_refl x1)) v2)) (THead (Bind Abbr) x2 x3) -(pr3_head_12 c x2 x2 (pr3_refl c x2) (Bind Abbr) x1 x3 (H7 Abbr x2))) (THead -(Flat Appl) (lift (S O) O x2) (lift (S O) O (THead (Bind Abst) x0 x1))) -(lift_flat Appl x2 (THead (Bind Abst) x0 x1) (S O) O)))) H8))) u2 H4))))))))) -H3)) (\lambda (H3: (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead -(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c v1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))))).(ex6_6_ind -B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind b0) y1 z1)))))))) (\lambda -(b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: -T).(\lambda (y2: T).(pr3 c (THead (Bind b0) y2 (THead (Flat Appl) (lift (S O) -O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) -y2) z1 z2))))))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O -v1) t)) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H4: (not (eq B x0 -Abst))).(\lambda (H5: (pr3 c (THead (Bind b) v2 t) (THead (Bind x0) x1 -x2))).(\lambda (H6: (pr3 c (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) -O x4) x3)) u2)).(\lambda (H7: (pr3 c v1 x4)).(\lambda (H8: (pr3 c x1 -x5)).(\lambda (H9: (pr3 (CHead c (Bind x0) x5) x2 x3)).(pr3_t (THead (Bind -x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O v1) t)) c (let H_x \def (pr3_gen_bind b H c v2 t -(THead (Bind x0) x1 x2) H5) in (let H10 \def H_x in (or_ind (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: -T).(\lambda (t2: T).(pr3 (CHead c (Bind b) v2) t t2)))) (pr3 (CHead c (Bind -b) v2) t (lift (S O) O (THead (Bind x0) x1 x2))) (pr3 c (THead (Bind b) v2 -(THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind x0) x5 (THead (Flat -Appl) (lift (S O) O x4) x3))) (\lambda (H11: (ex3_2 T T (\lambda (u3: -T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda -(t2: T).(pr3 (CHead c (Bind b) v2) t t2))))).(ex3_2_ind T T (\lambda (u3: -T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda -(t2: T).(pr3 (CHead c (Bind b) v2) t t2))) (pr3 c (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O v1) t)) (THead (Bind x0) x5 (THead (Flat Appl) -(lift (S O) O x4) x3))) (\lambda (x6: T).(\lambda (x7: T).(\lambda (H12: (eq -T (THead (Bind x0) x1 x2) (THead (Bind b) x6 x7))).(\lambda (H13: (pr3 c v2 -x6)).(\lambda (H14: (pr3 (CHead c (Bind b) v2) t x7)).(let H15 \def (f_equal -T B (\lambda (e: T).(match e in T return (\lambda (_: T).B) with [(TSort _) -\Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead k _ _) \Rightarrow (match -k in K return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow x0])])) (THead (Bind x0) x1 x2) (THead (Bind b) x6 x7) H12) in -((let H16 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: -T).T) with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ t0 -_) \Rightarrow t0])) (THead (Bind x0) x1 x2) (THead (Bind b) x6 x7) H12) in -((let H17 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: -T).T) with [(TSort _) \Rightarrow x2 | (TLRef _) \Rightarrow x2 | (THead _ _ -t0) \Rightarrow t0])) (THead (Bind x0) x1 x2) (THead (Bind b) x6 x7) H12) in -(\lambda (H18: (eq T x1 x6)).(\lambda (H19: (eq B x0 b)).(let H20 \def -(eq_ind_r T x7 (\lambda (t0: T).(pr3 (CHead c (Bind b) v2) t t0)) H14 x2 H17) -in (let H21 \def (eq_ind_r T x6 (\lambda (t0: T).(pr3 c v2 t0)) H13 x1 H18) -in (let H22 \def (eq_ind B x0 (\lambda (b0: B).(pr3 (CHead c (Bind b0) x5) x2 -x3)) H9 b H19) in (let H23 \def (eq_ind B x0 (\lambda (b0: B).(not (eq B b0 -Abst))) H4 b H19) in (eq_ind_r B b (\lambda (b0: B).(pr3 c (THead (Bind b) v2 -(THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind b0) x5 (THead (Flat -Appl) (lift (S O) O x4) x3)))) (pr3_head_21 c v2 x5 (pr3_t x1 v2 c H21 x5 H8) -(Bind b) (THead (Flat Appl) (lift (S O) O v1) t) (THead (Flat Appl) (lift (S -O) O x4) x3) (pr3_flat (CHead c (Bind b) v2) (lift (S O) O v1) (lift (S O) O -x4) (pr3_lift (CHead c (Bind b) v2) c (S O) O (drop_drop (Bind b) O c c -(drop_refl c) v2) v1 x4 H7) t x3 (pr3_t x2 t (CHead c (Bind b) v2) H20 x3 -(pr3_pr3_pr3_t c v2 x1 H21 x2 x3 (Bind b) (pr3_pr3_pr3_t c x1 x5 H8 x2 x3 -(Bind b) H22))) Appl)) x0 H19)))))))) H16)) H15))))))) H11)) (\lambda (H11: -(pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind x0) x1 x2)))).(pr3_t -(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O x4) (lift (S O) O (THead -(Bind x0) x1 x2)))) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) -t)) c (pr3_head_2 c v2 (THead (Flat Appl) (lift (S O) O v1) t) (THead (Flat -Appl) (lift (S O) O x4) (lift (S O) O (THead (Bind x0) x1 x2))) (Bind b) -(pr3_flat (CHead c (Bind b) v2) (lift (S O) O v1) (lift (S O) O x4) (pr3_lift -(CHead c (Bind b) v2) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) v2) -v1 x4 H7) t (lift (S O) O (THead (Bind x0) x1 x2)) H11 Appl)) (THead (Bind -x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (eq_ind T (lift (S O) O -(THead (Flat Appl) x4 (THead (Bind x0) x1 x2))) (\lambda (t0: T).(pr3 c -(THead (Bind b) v2 t0) (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O -x4) x3)))) (pr3_sing c (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O -x4) x2)) (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) x4 (THead (Bind -x0) x1 x2)))) (pr2_free c (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) -x4 (THead (Bind x0) x1 x2)))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S -O) O x4) x2)) (pr0_zeta b H (THead (Flat Appl) x4 (THead (Bind x0) x1 x2)) -(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (pr0_upsilon x0 -H4 x4 x4 (pr0_refl x4) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2)) v2)) (THead -(Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (pr3_head_12 c x1 x5 -H8 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) (THead (Flat Appl) -(lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H9 (lift (S -O) O x4) Appl))) (THead (Flat Appl) (lift (S O) O x4) (lift (S O) O (THead -(Bind x0) x1 x2))) (lift_flat Appl x4 (THead (Bind x0) x1 x2) (S O) O)))) -H10))) u2 H6))))))))))))) H3)) H2)))))))))). - -theorem pr3_iso_appls_appl_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (v: T).(\forall (u: -T).(\forall (t: T).(\forall (vs: TList).(let u1 \def (THeads (Flat Appl) vs -(THead (Flat Appl) v (THead (Bind b) u t))) in (\forall (c: C).(\forall (u2: -T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c -(THeads (Flat Appl) vs (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) -t))) u2))))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (v: T).(\lambda -(u: T).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: -TList).(let u1 \def (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind -b) u t))) in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 -u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (THead -(Bind b) u (THead (Flat Appl) (lift (S O) O v) t))) u2))))))) (\lambda (c: -C).(\lambda (u2: T).(\lambda (H0: (pr3 c (THead (Flat Appl) v (THead (Bind b) -u t)) u2)).(\lambda (H1: (((iso (THead (Flat Appl) v (THead (Bind b) u t)) -u2) \to (\forall (P: Prop).P)))).(pr3_iso_appl_bind b H v u t c u2 H0 H1))))) -(\lambda (t0: T).(\lambda (t1: TList).(\lambda (H0: ((\forall (c: C).(\forall -(u2: T).((pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u -t))) u2) \to ((((iso (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind -b) u t))) u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t1 -(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t))) u2))))))).(\lambda -(c: C).(\lambda (u2: T).(\lambda (H1: (pr3 c (THead (Flat Appl) t0 (THeads -(Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t)))) u2)).(\lambda -(H2: (((iso (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Flat Appl) v -(THead (Bind b) u t)))) u2) \to (\forall (P: Prop).P)))).(let H3 \def -(pr3_gen_appl c t0 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind -b) u t))) u2 H1) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq -T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 -u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead -(Flat Appl) v (THead (Bind b) u t))) t2)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat -Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: -B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2)))))))) (ex6_6 B T T T -T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) (THead -(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2)))))))) (pr3 c -(THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat -Appl) (lift (S O) O v) t)))) u2) (\lambda (H4: (ex3_2 T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c t0 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c -(THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) -t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead -(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))) -(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat -Appl) v (THead (Bind b) u t))) t2))) (pr3 c (THead (Flat Appl) t0 (THeads -(Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) -u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T u2 (THead (Flat -Appl) x0 x1))).(\lambda (_: (pr3 c t0 x0)).(\lambda (_: (pr3 c (THeads (Flat -Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) x1)).(let H8 \def -(eq_ind T u2 (\lambda (t2: T).((iso (THead (Flat Appl) t0 (THeads (Flat Appl) -t1 (THead (Flat Appl) v (THead (Bind b) u t)))) t2) \to (\forall (P: -Prop).P))) H2 (THead (Flat Appl) x0 x1) H5) in (eq_ind_r T (THead (Flat Appl) -x0 x1) (\lambda (t2: T).(pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 -(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) t2)) (H8 -(iso_head t0 x0 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u -t))) x1 (Flat Appl)) (pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 -(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) (THead (Flat -Appl) x0 x1))) u2 H5))))))) H4)) (\lambda (H4: (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat -Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: -B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2))))))))).(ex4_4_ind T T -T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c -(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat -Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: -B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2))))))) (pr3 c (THead -(Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) -(lift (S O) O v) t)))) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: -T).(\lambda (x3: T).(\lambda (H5: (pr3 c (THead (Bind Abbr) x2 x3) -u2)).(\lambda (H6: (pr3 c t0 x2)).(\lambda (H7: (pr3 c (THeads (Flat Appl) t1 -(THead (Flat Appl) v (THead (Bind b) u t))) (THead (Bind Abst) x0 -x1))).(\lambda (H8: ((\forall (b0: B).(\forall (u0: T).(pr3 (CHead c (Bind -b0) u0) x1 x3))))).(pr3_t (THead (Bind Abbr) t0 x1) (THead (Flat Appl) t0 -(THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) -t)))) c (pr3_t (THead (Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Flat -Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S -O) O v) t)))) c (pr3_thin_dx c (THeads (Flat Appl) t1 (THead (Bind b) u -(THead (Flat Appl) (lift (S O) O v) t))) (THead (Bind Abst) x0 x1) (H0 c -(THead (Bind Abst) x0 x1) H7 (\lambda (H9: (iso (THeads (Flat Appl) t1 (THead -(Flat Appl) v (THead (Bind b) u t))) (THead (Bind Abst) x0 x1))).(\lambda (P: -Prop).(iso_flats_flat_bind_false Appl Appl Abst x0 v x1 (THead (Bind b) u t) -t1 H9 P)))) t0 Appl) (THead (Bind Abbr) t0 x1) (pr3_pr2 c (THead (Flat Appl) -t0 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) t0 x1) (pr2_free c (THead -(Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) t0 x1) (pr0_beta -x0 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl x1))))) u2 (pr3_t (THead (Bind Abbr) -x2 x3) (THead (Bind Abbr) t0 x1) c (pr3_head_12 c t0 x2 H6 (Bind Abbr) x1 x3 -(H8 Abbr x2)) u2 H5)))))))))) H4)) (\lambda (H4: (ex6_6 B T T T T T (\lambda -(b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) (THead -(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))))).(ex6_6_ind -B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u -t))) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind -b0) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))) (pr3 c -(THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat -Appl) (lift (S O) O v) t)))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda -(x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H5: (not -(eq B x0 Abst))).(\lambda (H6: (pr3 c (THeads (Flat Appl) t1 (THead (Flat -Appl) v (THead (Bind b) u t))) (THead (Bind x0) x1 x2))).(\lambda (H7: (pr3 c -(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda -(H8: (pr3 c t0 x4)).(\lambda (H9: (pr3 c x1 x5)).(\lambda (H10: (pr3 (CHead c -(Bind x0) x5) x2 x3)).(pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S -O) O x4) x2)) (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u -(THead (Flat Appl) (lift (S O) O v) t)))) c (pr3_t (THead (Bind x0) x1 (THead -(Flat Appl) (lift (S O) O t0) x2)) (THead (Flat Appl) t0 (THeads (Flat Appl) -t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) c (pr3_t -(THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Flat Appl) t0 (THeads -(Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) c -(pr3_thin_dx c (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) -(lift (S O) O v) t))) (THead (Bind x0) x1 x2) (H0 c (THead (Bind x0) x1 x2) -H6 (\lambda (H11: (iso (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead -(Bind b) u t))) (THead (Bind x0) x1 x2))).(\lambda (P: -Prop).(iso_flats_flat_bind_false Appl Appl x0 x1 v x2 (THead (Bind b) u t) t1 -H11 P)))) t0 Appl) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t0) -x2)) (pr3_pr2 c (THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Bind -x0) x1 (THead (Flat Appl) (lift (S O) O t0) x2)) (pr2_free c (THead (Flat -Appl) t0 (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) -(lift (S O) O t0) x2)) (pr0_upsilon x0 H5 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl -x1) x2 x2 (pr0_refl x2))))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S -O) O x4) x2)) (pr3_head_12 c x1 x1 (pr3_refl c x1) (Bind x0) (THead (Flat -Appl) (lift (S O) O t0) x2) (THead (Flat Appl) (lift (S O) O x4) x2) -(pr3_head_12 (CHead c (Bind x0) x1) (lift (S O) O t0) (lift (S O) O x4) -(pr3_lift (CHead c (Bind x0) x1) c (S O) O (drop_drop (Bind x0) O c c -(drop_refl c) x1) t0 x4 H8) (Flat Appl) x2 x2 (pr3_refl (CHead (CHead c (Bind -x0) x1) (Flat Appl) (lift (S O) O x4)) x2)))) u2 (pr3_t (THead (Bind x0) x5 -(THead (Flat Appl) (lift (S O) O x4) x3)) (THead (Bind x0) x1 (THead (Flat -Appl) (lift (S O) O x4) x2)) c (pr3_head_12 c x1 x5 H9 (Bind x0) (THead (Flat -Appl) (lift (S O) O x4) x2) (THead (Flat Appl) (lift (S O) O x4) x3) -(pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H10 (lift (S O) O x4) Appl)) u2 -H7)))))))))))))) H4)) H3))))))))) vs)))))). - -theorem pr3_iso_appls_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (vs: TList).(\forall (u: -T).(\forall (t: T).(let u1 \def (THeads (Flat Appl) vs (THead (Bind b) u t)) -in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to -(\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat Appl) -(lifts (S O) O vs) t)) u2)))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (vs: -TList).(tlist_ind_rew (\lambda (t: TList).(\forall (u: T).(\forall (t0: -T).(let u1 \def (THeads (Flat Appl) t (THead (Bind b) u t0)) in (\forall (c: -C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: -Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O t) -t0)) u2))))))))) (\lambda (u: T).(\lambda (t: T).(\lambda (c: C).(\lambda -(u2: T).(\lambda (H0: (pr3 c (THead (Bind b) u t) u2)).(\lambda (_: (((iso -(THead (Bind b) u t) u2) \to (\forall (P: Prop).P)))).H0)))))) (\lambda (ts: -TList).(\lambda (t: T).(\lambda (H0: ((\forall (u: T).(\forall (t0: -T).(\forall (c: C).(\forall (u2: T).((pr3 c (THeads (Flat Appl) ts (THead -(Bind b) u t0)) u2) \to ((((iso (THeads (Flat Appl) ts (THead (Bind b) u t0)) -u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat -Appl) (lifts (S O) O ts) t0)) u2))))))))).(\lambda (u: T).(\lambda (t0: -T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H1: (pr3 c (THeads (Flat Appl) -(TApp ts t) (THead (Bind b) u t0)) u2)).(\lambda (H2: (((iso (THeads (Flat -Appl) (TApp ts t) (THead (Bind b) u t0)) u2) \to (\forall (P: -Prop).P)))).(eq_ind_r TList (TApp (lifts (S O) O ts) (lift (S O) O t)) -(\lambda (t1: TList).(pr3 c (THead (Bind b) u (THeads (Flat Appl) t1 t0)) -u2)) (eq_ind_r T (THeads (Flat Appl) (lifts (S O) O ts) (THead (Flat Appl) -(lift (S O) O t) t0)) (\lambda (t1: T).(pr3 c (THead (Bind b) u t1) u2)) (let -H3 \def (eq_ind T (THeads (Flat Appl) (TApp ts t) (THead (Bind b) u t0)) -(\lambda (t1: T).(pr3 c t1 u2)) H1 (THeads (Flat Appl) ts (THead (Flat Appl) -t (THead (Bind b) u t0))) (theads_tapp (Flat Appl) ts t (THead (Bind b) u -t0))) in (let H4 \def (eq_ind T (THeads (Flat Appl) (TApp ts t) (THead (Bind -b) u t0)) (\lambda (t1: T).((iso t1 u2) \to (\forall (P: Prop).P))) H2 -(THeads (Flat Appl) ts (THead (Flat Appl) t (THead (Bind b) u t0))) -(theads_tapp (Flat Appl) ts t (THead (Bind b) u t0))) in (TList_ind (\lambda -(t1: TList).(((\forall (u0: T).(\forall (t2: T).(\forall (c0: C).(\forall -(u3: T).((pr3 c0 (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) u3) \to -((((iso (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) u3) \to (\forall (P: -Prop).P))) \to (pr3 c0 (THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O -t1) t2)) u3)))))))) \to ((pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) t -(THead (Bind b) u t0))) u2) \to ((((iso (THeads (Flat Appl) t1 (THead (Flat -Appl) t (THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P))) \to (pr3 c -(THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O t1) (THead (Flat Appl) -(lift (S O) O t) t0))) u2))))) (\lambda (_: ((\forall (u0: T).(\forall (t1: -T).(\forall (c0: C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) TNil (THead -(Bind b) u0 t1)) u3) \to ((((iso (THeads (Flat Appl) TNil (THead (Bind b) u0 -t1)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 (THead (Bind b) u0 (THeads -(Flat Appl) (lifts (S O) O TNil) t1)) u3))))))))).(\lambda (H6: (pr3 c -(THeads (Flat Appl) TNil (THead (Flat Appl) t (THead (Bind b) u t0))) -u2)).(\lambda (H7: (((iso (THeads (Flat Appl) TNil (THead (Flat Appl) t -(THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P)))).(pr3_iso_appl_bind b -H t u t0 c u2 H6 H7)))) (\lambda (t1: T).(\lambda (ts0: TList).(\lambda (_: -((((\forall (u0: T).(\forall (t2: T).(\forall (c0: C).(\forall (u3: T).((pr3 -c0 (THeads (Flat Appl) ts0 (THead (Bind b) u0 t2)) u3) \to ((((iso (THeads -(Flat Appl) ts0 (THead (Bind b) u0 t2)) u3) \to (\forall (P: Prop).P))) \to -(pr3 c0 (THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O ts0) t2)) -u3)))))))) \to ((pr3 c (THeads (Flat Appl) ts0 (THead (Flat Appl) t (THead -(Bind b) u t0))) u2) \to ((((iso (THeads (Flat Appl) ts0 (THead (Flat Appl) t -(THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead -(Bind b) u (THeads (Flat Appl) (lifts (S O) O ts0) (THead (Flat Appl) (lift -(S O) O t) t0))) u2)))))).(\lambda (H5: ((\forall (u0: T).(\forall (t2: -T).(\forall (c0: C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) (TCons t1 -ts0) (THead (Bind b) u0 t2)) u3) \to ((((iso (THeads (Flat Appl) (TCons t1 -ts0) (THead (Bind b) u0 t2)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 -(THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O (TCons t1 ts0)) t2)) -u3))))))))).(\lambda (H6: (pr3 c (THeads (Flat Appl) (TCons t1 ts0) (THead -(Flat Appl) t (THead (Bind b) u t0))) u2)).(\lambda (H7: (((iso (THeads (Flat -Appl) (TCons t1 ts0) (THead (Flat Appl) t (THead (Bind b) u t0))) u2) \to -(\forall (P: Prop).P)))).(H5 u (THead (Flat Appl) (lift (S O) O t) t0) c u2 -(pr3_iso_appls_appl_bind b H t u t0 (TCons t1 ts0) c u2 H6 H7) (\lambda (H8: -(iso (THeads (Flat Appl) (TCons t1 ts0) (THead (Bind b) u (THead (Flat Appl) -(lift (S O) O t) t0))) u2)).(\lambda (P: Prop).(H7 (iso_trans (THeads (Flat -Appl) (TCons t1 ts0) (THead (Flat Appl) t (THead (Bind b) u t0))) (THeads -(Flat Appl) (TCons t1 ts0) (THead (Bind b) u (THead (Flat Appl) (lift (S O) O -t) t0))) (iso_head t1 t1 (THeads (Flat Appl) ts0 (THead (Flat Appl) t (THead -(Bind b) u t0))) (THeads (Flat Appl) ts0 (THead (Bind b) u (THead (Flat Appl) -(lift (S O) O t) t0))) (Flat Appl)) u2 H8) P)))))))))) ts H0 H3 H4))) (THeads -(Flat Appl) (TApp (lifts (S O) O ts) (lift (S O) O t)) t0) (theads_tapp (Flat -Appl) (lifts (S O) O ts) (lift (S O) O t) t0)) (lifts (S O) O (TApp ts t)) -(lifts_tapp (S O) O t ts))))))))))) vs))). - -theorem pr3_iso_beta: - \forall (v: T).(\forall (w: T).(\forall (t: T).(let u1 \def (THead (Flat -Appl) v (THead (Bind Abst) w t)) in (\forall (c: C).(\forall (u2: T).((pr3 c -u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead (Bind -Abbr) v t) u2)))))))) -\def - \lambda (v: T).(\lambda (w: T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: -T).(\lambda (H: (pr3 c (THead (Flat Appl) v (THead (Bind Abst) w t)) -u2)).(\lambda (H0: (((iso (THead (Flat Appl) v (THead (Bind Abst) w t)) u2) -\to (\forall (P: Prop).P)))).(let H1 \def (pr3_gen_appl c v (THead (Bind -Abst) w t) u2 H) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq -T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v -u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THead (Bind Abst) w t) t2)))) -(ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: -T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))) (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) -w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind -b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) w t) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c v u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c -(THead (Bind Abbr) v t) u2) (\lambda (H2: (ex3_2 T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c -(THead (Bind Abst) w t) t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: -T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: -T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THead (Bind Abst) -w t) t2))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H3: (eq T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c v -x0)).(\lambda (_: (pr3 c (THead (Bind Abst) w t) x1)).(let H6 \def (eq_ind T -u2 (\lambda (t0: T).((iso (THead (Flat Appl) v (THead (Bind Abst) w t)) t0) -\to (\forall (P: Prop).P))) H0 (THead (Flat Appl) x0 x1) H3) in (eq_ind_r T -(THead (Flat Appl) x0 x1) (\lambda (t0: T).(pr3 c (THead (Bind Abbr) v t) -t0)) (H6 (iso_head v x0 (THead (Bind Abst) w t) x1 (Flat Appl)) (pr3 c (THead -(Bind Abbr) v t) (THead (Flat Appl) x0 x1))) u2 H3))))))) H2)) (\lambda (H2: -(ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: -T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))) (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) -w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind -b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v -u3))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c (THead (Bind Abst) w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall -(u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))) (pr3 c (THead (Bind Abbr) v t) -u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (H3: (pr3 c (THead (Bind Abbr) x2 x3) u2)).(\lambda (H4: (pr3 c v -x2)).(\lambda (H5: (pr3 c (THead (Bind Abst) w t) (THead (Bind Abst) x0 -x1))).(\lambda (H6: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) -u) x1 x3))))).(let H7 \def (pr3_gen_abst c w t (THead (Bind Abst) x0 x1) H5) -in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind Abst) -x0 x1) (THead (Bind Abst) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c w -u3))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) t t2))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda -(x4: T).(\lambda (x5: T).(\lambda (H8: (eq T (THead (Bind Abst) x0 x1) (THead -(Bind Abst) x4 x5))).(\lambda (H9: (pr3 c w x4)).(\lambda (H10: ((\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t x5))))).(let H11 \def (f_equal -T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ t0 _) \Rightarrow t0])) -(THead (Bind Abst) x0 x1) (THead (Bind Abst) x4 x5) H8) in ((let H12 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t0) -\Rightarrow t0])) (THead (Bind Abst) x0 x1) (THead (Bind Abst) x4 x5) H8) in -(\lambda (H13: (eq T x0 x4)).(let H14 \def (eq_ind_r T x5 (\lambda (t0: -T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t t0)))) H10 x1 -H12) in (let H15 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 c w t0)) H9 x0 -H13) in (pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) v t) c -(pr3_head_12 c v x2 H4 (Bind Abbr) t x3 (pr3_t x1 t (CHead c (Bind Abbr) x2) -(H14 Abbr x2) x3 (H6 Abbr x2))) u2 H3))))) H11))))))) H7)))))))))) H2)) -(\lambda (H2: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) w t) (THead (Bind b) y1 -z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: -T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat -Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THead (Bind Abst) w t) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda -(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) -u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2))))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda (x0: B).(\lambda -(x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: -T).(\lambda (H3: (not (eq B x0 Abst))).(\lambda (H4: (pr3 c (THead (Bind -Abst) w t) (THead (Bind x0) x1 x2))).(\lambda (H5: (pr3 c (THead (Bind x0) x5 -(THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (_: (pr3 c v -x4)).(\lambda (_: (pr3 c x1 x5)).(\lambda (H8: (pr3 (CHead c (Bind x0) x5) x2 -x3)).(let H9 \def (pr3_gen_abst c w t (THead (Bind x0) x1 x2) H4) in -(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c w -u3))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) t t2))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda -(x6: T).(\lambda (x7: T).(\lambda (H10: (eq T (THead (Bind x0) x1 x2) (THead -(Bind Abst) x6 x7))).(\lambda (H11: (pr3 c w x6)).(\lambda (H12: ((\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t x7))))).(let H13 \def -(f_equal T B (\lambda (e: T).(match e in T return (\lambda (_: T).B) with -[(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead k _ _) -\Rightarrow (match k in K return (\lambda (_: K).B) with [(Bind b) -\Rightarrow b | (Flat _) \Rightarrow x0])])) (THead (Bind x0) x1 x2) (THead -(Bind Abst) x6 x7) H10) in ((let H14 \def (f_equal T T (\lambda (e: T).(match -e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x1 | (TLRef _) -\Rightarrow x1 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind x0) x1 x2) -(THead (Bind Abst) x6 x7) H10) in ((let H15 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x2 | -(TLRef _) \Rightarrow x2 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind x0) -x1 x2) (THead (Bind Abst) x6 x7) H10) in (\lambda (H16: (eq T x1 -x6)).(\lambda (H17: (eq B x0 Abst)).(let H18 \def (eq_ind_r T x7 (\lambda -(t0: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t t0)))) -H12 x2 H15) in (let H19 \def (eq_ind_r T x6 (\lambda (t0: T).(pr3 c w t0)) -H11 x1 H16) in (let H20 \def (eq_ind B x0 (\lambda (b: B).(pr3 (CHead c (Bind -b) x5) x2 x3)) H8 Abst H17) in (let H21 \def (eq_ind B x0 (\lambda (b: -B).(pr3 c (THead (Bind b) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)) -H5 Abst H17) in (let H22 \def (eq_ind B x0 (\lambda (b: B).(not (eq B b -Abst))) H3 Abst H17) in (let H23 \def (match (H22 (refl_equal B Abst)) in -False return (\lambda (_: False).(pr3 c (THead (Bind Abbr) v t) u2)) with []) -in H23))))))))) H14)) H13))))))) H9)))))))))))))) H2)) H1)))))))). - -theorem pr3_iso_appls_beta: - \forall (us: TList).(\forall (v: T).(\forall (w: T).(\forall (t: T).(let u1 -\def (THeads (Flat Appl) us (THead (Flat Appl) v (THead (Bind Abst) w t))) in -(\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to -(\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) us (THead (Bind Abbr) -v t)) u2))))))))) -\def - \lambda (us: TList).(TList_ind (\lambda (t: TList).(\forall (v: T).(\forall -(w: T).(\forall (t0: T).(let u1 \def (THeads (Flat Appl) t (THead (Flat Appl) -v (THead (Bind Abst) w t0))) in (\forall (c: C).(\forall (u2: T).((pr3 c u1 -u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat -Appl) t (THead (Bind Abbr) v t0)) u2)))))))))) (\lambda (v: T).(\lambda (w: -T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H: (pr3 c -(THead (Flat Appl) v (THead (Bind Abst) w t)) u2)).(\lambda (H0: (((iso -(THead (Flat Appl) v (THead (Bind Abst) w t)) u2) \to (\forall (P: -Prop).P)))).(pr3_iso_beta v w t c u2 H H0)))))))) (\lambda (t: T).(\lambda -(t0: TList).(\lambda (H: ((\forall (v: T).(\forall (w: T).(\forall (t1: -T).(\forall (c: C).(\forall (u2: T).((pr3 c (THeads (Flat Appl) t0 (THead -(Flat Appl) v (THead (Bind Abst) w t1))) u2) \to ((((iso (THeads (Flat Appl) -t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) u2) \to (\forall (P: -Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1)) -u2)))))))))).(\lambda (v: T).(\lambda (w: T).(\lambda (t1: T).(\lambda (c: -C).(\lambda (u2: T).(\lambda (H0: (pr3 c (THead (Flat Appl) t (THeads (Flat -Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1)))) u2)).(\lambda (H1: -(((iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Flat Appl) v -(THead (Bind Abst) w t1)))) u2) \to (\forall (P: Prop).P)))).(let H2 \def -(pr3_gen_appl c t (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind -Abst) w t1))) u2 H0) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: -T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: -T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) -t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) t2)))) (ex4_4 T T T T -(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c -(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat -Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c -(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) u2) -(\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead -(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) -(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat -Appl) v (THead (Bind Abst) w t1))) t2))))).(ex3_2_ind T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c -(THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) t2))) -(pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) -u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T u2 (THead (Flat -Appl) x0 x1))).(\lambda (_: (pr3 c t x0)).(\lambda (_: (pr3 c (THeads (Flat -Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) x1)).(let H7 \def -(eq_ind T u2 (\lambda (t2: T).((iso (THead (Flat Appl) t (THeads (Flat Appl) -t0 (THead (Flat Appl) v (THead (Bind Abst) w t1)))) t2) \to (\forall (P: -Prop).P))) H1 (THead (Flat Appl) x0 x1) H4) in (eq_ind_r T (THead (Flat Appl) -x0 x1) (\lambda (t2: T).(pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 -(THead (Bind Abbr) v t1))) t2)) (H7 (iso_head t x0 (THeads (Flat Appl) t0 -(THead (Flat Appl) v (THead (Bind Abst) w t1))) x1 (Flat Appl)) (pr3 c (THead -(Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) (THead (Flat -Appl) x0 x1))) u2 H4))))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat -Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T -T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c -(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat -Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))) (pr3 c (THead (Flat -Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) u2) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (pr3 c -(THead (Bind Abbr) x2 x3) u2)).(\lambda (H5: (pr3 c t x2)).(\lambda (H6: (pr3 -c (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) -(THead (Bind Abst) x0 x1))).(\lambda (H7: ((\forall (b: B).(\forall (u: -T).(pr3 (CHead c (Bind b) u) x1 x3))))).(pr3_t (THead (Bind Abbr) t x1) -(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c -(pr3_t (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead (Flat Appl) t -(THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c (pr3_thin_dx c (THeads -(Flat Appl) t0 (THead (Bind Abbr) v t1)) (THead (Bind Abst) x0 x1) (H v w t1 -c (THead (Bind Abst) x0 x1) H6 (\lambda (H8: (iso (THeads (Flat Appl) t0 -(THead (Flat Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) x0 -x1))).(\lambda (P: Prop).(iso_flats_flat_bind_false Appl Appl Abst x0 v x1 -(THead (Bind Abst) w t1) t0 H8 P)))) t Appl) (THead (Bind Abbr) t x1) -(pr3_pr2 c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) -t x1) (pr2_free c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead -(Bind Abbr) t x1) (pr0_beta x0 t t (pr0_refl t) x1 x1 (pr0_refl x1))))) u2 -(pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) t x1) c (pr3_head_12 c t -x2 H5 (Bind Abbr) x1 x3 (H7 Abbr x2)) u2 H4)))))))))) H3)) (\lambda (H3: -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) -w t1))) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 -z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat -Appl) v (THead (Bind Abst) w t1))) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda -(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) -u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead -(Bind Abbr) v t1))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: -T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H4: (not (eq -B x0 Abst))).(\lambda (H5: (pr3 c (THeads (Flat Appl) t0 (THead (Flat Appl) v -(THead (Bind Abst) w t1))) (THead (Bind x0) x1 x2))).(\lambda (H6: (pr3 c -(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda -(H7: (pr3 c t x4)).(\lambda (H8: (pr3 c x1 x5)).(\lambda (H9: (pr3 (CHead c -(Bind x0) x5) x2 x3)).(pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S -O) O x4) x2)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) -v t1))) c (pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) -(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c -(pr3_t (THead (Flat Appl) t (THead (Bind x0) x1 x2)) (THead (Flat Appl) t -(THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c (pr3_thin_dx c (THeads -(Flat Appl) t0 (THead (Bind Abbr) v t1)) (THead (Bind x0) x1 x2) (H v w t1 c -(THead (Bind x0) x1 x2) H5 (\lambda (H10: (iso (THeads (Flat Appl) t0 (THead -(Flat Appl) v (THead (Bind Abst) w t1))) (THead (Bind x0) x1 x2))).(\lambda -(P: Prop).(iso_flats_flat_bind_false Appl Appl x0 x1 v x2 (THead (Bind Abst) -w t1) t0 H10 P)))) t Appl) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) -O t) x2)) (pr3_pr2 c (THead (Flat Appl) t (THead (Bind x0) x1 x2)) (THead -(Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr2_free c (THead -(Flat Appl) t (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) -(lift (S O) O t) x2)) (pr0_upsilon x0 H4 t t (pr0_refl t) x1 x1 (pr0_refl x1) -x2 x2 (pr0_refl x2))))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O -x4) x2)) (pr3_head_12 c x1 x1 (pr3_refl c x1) (Bind x0) (THead (Flat Appl) -(lift (S O) O t) x2) (THead (Flat Appl) (lift (S O) O x4) x2) (pr3_head_12 -(CHead c (Bind x0) x1) (lift (S O) O t) (lift (S O) O x4) (pr3_lift (CHead c -(Bind x0) x1) c (S O) O (drop_drop (Bind x0) O c c (drop_refl c) x1) t x4 H7) -(Flat Appl) x2 x2 (pr3_refl (CHead (CHead c (Bind x0) x1) (Flat Appl) (lift -(S O) O x4)) x2)))) u2 (pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S -O) O x4) x3)) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) c -(pr3_head_12 c x1 x5 H8 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) -(THead (Flat Appl) (lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) -x2 x3 H9 (lift (S O) O x4) Appl)) u2 H6)))))))))))))) H3)) H2)))))))))))) us). - -theorem csuba_gen_abst_rev: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g c -(CHead d1 (Bind Abst) u)) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: -(csuba g c (CHead d1 (Bind Abst) u))).(let H0 \def (match H in csuba return -(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 c1)).((eq C c0 c) -\to ((eq C c1 (CHead d1 (Bind Abst) u)) \to (ex2 C (\lambda (d2: C).(eq C c -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) with -[(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) c)).(\lambda (H1: -(eq C (CSort n) (CHead d1 (Bind Abst) u))).(eq_ind C (CSort n) (\lambda (c0: -C).((eq C (CSort n) (CHead d1 (Bind Abst) u)) \to (ex2 C (\lambda (d2: C).(eq -C c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))) (\lambda -(H2: (eq C (CSort n) (CHead d1 (Bind Abst) u))).(let H3 \def (eq_ind C (CSort -n) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) -\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abst) -u) H2) in (False_ind (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) H3))) c H0 H1))) | (csuba_head -c1 c2 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) c)).(\lambda -(H2: (eq C (CHead c2 k u0) (CHead d1 (Bind Abst) u))).(eq_ind C (CHead c1 k -u0) (\lambda (c0: C).((eq C (CHead c2 k u0) (CHead d1 (Bind Abst) u)) \to -((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(eq C c0 (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1)))))) (\lambda (H3: (eq C (CHead c2 k -u0) (CHead d1 (Bind Abst) u))).(let H4 \def (f_equal C T (\lambda (e: -C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | -(CHead _ _ t) \Rightarrow t])) (CHead c2 k u0) (CHead d1 (Bind Abst) u) H3) -in ((let H5 \def (f_equal C K (\lambda (e: C).(match e in C return (\lambda -(_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) -(CHead c2 k u0) (CHead d1 (Bind Abst) u) H3) in ((let H6 \def (f_equal C C -(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) -\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u0) (CHead d1 -(Bind Abst) u) H3) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Bind Abst)) \to -((eq T u0 u) \to ((csuba g c1 c0) \to (ex2 C (\lambda (d2: C).(eq C (CHead c1 -k u0) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))))) -(\lambda (H7: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) (\lambda (k0: -K).((eq T u0 u) \to ((csuba g c1 d1) \to (ex2 C (\lambda (d2: C).(eq C (CHead -c1 k0 u0) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))) -(\lambda (H8: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((csuba g c1 d1) \to -(ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))))) (\lambda (H9: (csuba g c1 -d1)).(ex_intro2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) u) (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 -(Bind Abst) u)) H9)) u0 (sym_eq T u0 u H8))) k (sym_eq K k (Bind Abst) H7))) -c2 (sym_eq C c2 d1 H6))) H5)) H4))) c H1 H2 H0))) | (csuba_abst c1 c2 H0 t a -H1 u0 H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) -c)).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u0) (CHead d1 (Bind Abst) -u))).(eq_ind C (CHead c1 (Bind Abst) t) (\lambda (c0: C).((eq C (CHead c2 -(Bind Abbr) u0) (CHead d1 (Bind Abst) u)) \to ((csuba g c1 c2) \to ((arity g -c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C (\lambda (d2: C).(eq C c0 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) (\lambda -(H5: (eq C (CHead c2 (Bind Abbr) u0) (CHead d1 (Bind Abst) u))).(let H6 \def -(eq_ind C (CHead c2 (Bind Abbr) u0) (\lambda (e: C).(match e in C return -(\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind b) -\Rightarrow (match b in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow -True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) -\Rightarrow False])])) I (CHead d1 (Bind Abst) u) H5) in (False_ind ((csuba g -c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C -(\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1)))))) H6))) c H3 H4 H0 H1 H2)))]) in (H0 -(refl_equal C c) (refl_equal C (CHead d1 (Bind Abst) u)))))))). - -theorem csuba_gen_void_rev: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g c -(CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind -Void) u))) (\lambda (d2: C).(csuba g d2 d1))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: -(csuba g c (CHead d1 (Bind Void) u))).(let H0 \def (match H in csuba return -(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 c1)).((eq C c0 c) -\to ((eq C c1 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c -(CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) with -[(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) c)).(\lambda (H1: -(eq C (CSort n) (CHead d1 (Bind Void) u))).(eq_ind C (CSort n) (\lambda (c0: -C).((eq C (CSort n) (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq -C c0 (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1))))) (\lambda -(H2: (eq C (CSort n) (CHead d1 (Bind Void) u))).(let H3 \def (eq_ind C (CSort -n) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) -\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Void) -u) H2) in (False_ind (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind -Void) u))) (\lambda (d2: C).(csuba g d2 d1))) H3))) c H0 H1))) | (csuba_head -c1 c2 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) c)).(\lambda -(H2: (eq C (CHead c2 k u0) (CHead d1 (Bind Void) u))).(eq_ind C (CHead c1 k -u0) (\lambda (c0: C).((eq C (CHead c2 k u0) (CHead d1 (Bind Void) u)) \to -((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(eq C c0 (CHead d2 (Bind Void) -u))) (\lambda (d2: C).(csuba g d2 d1)))))) (\lambda (H3: (eq C (CHead c2 k -u0) (CHead d1 (Bind Void) u))).(let H4 \def (f_equal C T (\lambda (e: -C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | -(CHead _ _ t) \Rightarrow t])) (CHead c2 k u0) (CHead d1 (Bind Void) u) H3) -in ((let H5 \def (f_equal C K (\lambda (e: C).(match e in C return (\lambda -(_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) -(CHead c2 k u0) (CHead d1 (Bind Void) u) H3) in ((let H6 \def (f_equal C C -(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) -\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u0) (CHead d1 -(Bind Void) u) H3) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Bind Void)) \to -((eq T u0 u) \to ((csuba g c1 c0) \to (ex2 C (\lambda (d2: C).(eq C (CHead c1 -k u0) (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1))))))) -(\lambda (H7: (eq K k (Bind Void))).(eq_ind K (Bind Void) (\lambda (k0: -K).((eq T u0 u) \to ((csuba g c1 d1) \to (ex2 C (\lambda (d2: C).(eq C (CHead -c1 k0 u0) (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))) -(\lambda (H8: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((csuba g c1 d1) \to -(ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Void) t) (CHead d2 (Bind Void) -u))) (\lambda (d2: C).(csuba g d2 d1))))) (\lambda (H9: (csuba g c1 -d1)).(ex_intro2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Void) u) (CHead d2 -(Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 -(Bind Void) u)) H9)) u0 (sym_eq T u0 u H8))) k (sym_eq K k (Bind Void) H7))) -c2 (sym_eq C c2 d1 H6))) H5)) H4))) c H1 H2 H0))) | (csuba_abst c1 c2 H0 t a -H1 u0 H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) -c)).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u0) (CHead d1 (Bind Void) -u))).(eq_ind C (CHead c1 (Bind Abst) t) (\lambda (c0: C).((eq C (CHead c2 -(Bind Abbr) u0) (CHead d1 (Bind Void) u)) \to ((csuba g c1 c2) \to ((arity g -c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C (\lambda (d2: C).(eq C c0 -(CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) (\lambda -(H5: (eq C (CHead c2 (Bind Abbr) u0) (CHead d1 (Bind Void) u))).(let H6 \def -(eq_ind C (CHead c2 (Bind Abbr) u0) (\lambda (e: C).(match e in C return -(\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind b) -\Rightarrow (match b in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow -True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) -\Rightarrow False])])) I (CHead d1 (Bind Void) u) H5) in (False_ind ((csuba g -c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C -(\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Void) u))) -(\lambda (d2: C).(csuba g d2 d1)))))) H6))) c H3 H4 H0 H1 H2)))]) in (H0 -(refl_equal C c) (refl_equal C (CHead d1 (Bind Void) u)))))))). - -theorem csuba_gen_abbr_rev: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g c -(CHead d1 (Bind Abbr) u1)) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a)))))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda -(H: (csuba g c (CHead d1 (Bind Abbr) u1))).(let H0 \def (match H in csuba -return (\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 c1)).((eq C -c0 c) \to ((eq C c1 (CHead d1 (Bind Abbr) u1)) \to (or (ex2 C (\lambda (d2: -C).(eq C c (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead -d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))))))))) with [(csuba_sort n) \Rightarrow (\lambda -(H0: (eq C (CSort n) c)).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abbr) -u1))).(eq_ind C (CSort n) (\lambda (c0: C).((eq C (CSort n) (CHead d1 (Bind -Abbr) u1)) \to (or (ex2 C (\lambda (d2: C).(eq C c0 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C c0 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))))) -(\lambda (H2: (eq C (CSort n) (CHead d1 (Bind Abbr) u1))).(let H3 \def -(eq_ind C (CSort n) (\lambda (e: C).(match e in C return (\lambda (_: -C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow -False])) I (CHead d1 (Bind Abbr) u1) H2) in (False_ind (or (ex2 C (\lambda -(d2: C).(eq C (CSort n) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g -d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C -(CSort n) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) H3))) c H0 H1))) | (csuba_head -c1 c2 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) c)).(\lambda -(H2: (eq C (CHead c2 k u) (CHead d1 (Bind Abbr) u1))).(eq_ind C (CHead c1 k -u) (\lambda (c0: C).((eq C (CHead c2 k u) (CHead d1 (Bind Abbr) u1)) \to -((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(eq C c0 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C c0 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))) -(\lambda (H3: (eq C (CHead c2 k u) (CHead d1 (Bind Abbr) u1))).(let H4 \def -(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with -[(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c2 k u) -(CHead d1 (Bind Abbr) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: -C).(match e in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | -(CHead _ k0 _) \Rightarrow k0])) (CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) -in ((let H6 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) -(CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) in (eq_ind C d1 (\lambda (c0: -C).((eq K k (Bind Abbr)) \to ((eq T u u1) \to ((csuba g c1 c0) \to (or (ex2 C -(\lambda (d2: C).(eq C (CHead c1 k u) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(eq C (CHead c1 k u) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))))))) -(\lambda (H7: (eq K k (Bind Abbr))).(eq_ind K (Bind Abbr) (\lambda (k0: -K).((eq T u u1) \to ((csuba g c1 d1) \to (or (ex2 C (\lambda (d2: C).(eq C -(CHead c1 k0 u) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C -(CHead c1 k0 u) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))))))) (\lambda (H8: (eq T u -u1)).(eq_ind T u1 (\lambda (t: T).((csuba g c1 d1) \to (or (ex2 C (\lambda -(d2: C).(eq C (CHead c1 (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(eq C (CHead c1 (Bind Abbr) t) (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a)))))))) (\lambda (H9: (csuba g c1 d1)).(or_introl (ex2 C (\lambda (d2: -C).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C -(\lambda (d2: C).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 (Bind Abbr) u1)) -H9))) u (sym_eq T u u1 H8))) k (sym_eq K k (Bind Abbr) H7))) c2 (sym_eq C c2 -d1 H6))) H5)) H4))) c H1 H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u H2) -\Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) c)).(\lambda (H4: -(eq C (CHead c2 (Bind Abbr) u) (CHead d1 (Bind Abbr) u1))).(eq_ind C (CHead -c1 (Bind Abst) t) (\lambda (c0: C).((eq C (CHead c2 (Bind Abbr) u) (CHead d1 -(Bind Abbr) u1)) \to ((csuba g c1 c2) \to ((arity g c1 t (asucc g a)) \to -((arity g c2 u a) \to (or (ex2 C (\lambda (d2: C).(eq C c0 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C c0 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 (asucc g a0))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 a0))))))))))) -(\lambda (H5: (eq C (CHead c2 (Bind Abbr) u) (CHead d1 (Bind Abbr) u1))).(let -H6 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) -with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 -(Bind Abbr) u) (CHead d1 (Bind Abbr) u1) H5) in ((let H7 \def (f_equal C C -(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) -\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 (Bind Abbr) u) -(CHead d1 (Bind Abbr) u1) H5) in (eq_ind C d1 (\lambda (c0: C).((eq T u u1) -\to ((csuba g c1 c0) \to ((arity g c1 t (asucc g a)) \to ((arity g c0 u a) -\to (or (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: -A).(arity g d2 u2 (asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a0: A).(arity g d1 u1 a0))))))))))) (\lambda (H8: (eq T u u1)).(eq_ind T u1 -(\lambda (t0: T).((csuba g c1 d1) \to ((arity g c1 t (asucc g a)) \to ((arity -g d1 t0 a) \to (or (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) -t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: -A).(arity g d2 u2 (asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a0: A).(arity g d1 u1 a0)))))))))) (\lambda (H9: (csuba g c1 d1)).(\lambda -(H10: (arity g c1 t (asucc g a))).(\lambda (H11: (arity g d1 u1 -a)).(or_intror (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: -A).(arity g d2 u2 (asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a0: A).(arity g d1 u1 a0))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 (asucc g -a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 -a0)))) c1 t a (refl_equal C (CHead c1 (Bind Abst) t)) H9 H10 H11))))) u -(sym_eq T u u1 H8))) c2 (sym_eq C c2 d1 H7))) H6))) c H3 H4 H0 H1 H2)))]) in -(H0 (refl_equal C c) (refl_equal C (CHead d1 (Bind Abbr) u1)))))))). - -theorem csuba_gen_flat_rev: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).(\forall -(f: F).((csuba g c (CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1))))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda -(f: F).(\lambda (H: (csuba g c (CHead d1 (Flat f) u1))).(let H0 \def (match H -in csuba return (\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 -c1)).((eq C c0 c) \to ((eq C c1 (CHead d1 (Flat f) u1)) \to (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))))))))) with [(csuba_sort n) -\Rightarrow (\lambda (H0: (eq C (CSort n) c)).(\lambda (H1: (eq C (CSort n) -(CHead d1 (Flat f) u1))).(eq_ind C (CSort n) (\lambda (c0: C).((eq C (CSort -n) (CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(eq C c0 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba -g d2 d1)))))) (\lambda (H2: (eq C (CSort n) (CHead d1 (Flat f) u1))).(let H3 -\def (eq_ind C (CSort n) (\lambda (e: C).(match e in C return (\lambda (_: -C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow -False])) I (CHead d1 (Flat f) u1) H2) in (False_ind (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(eq C (CSort n) (CHead d2 (Flat f) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) H3))) c H0 H1))) | (csuba_head c1 c2 H0 -k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) c)).(\lambda (H2: (eq C -(CHead c2 k u) (CHead d1 (Flat f) u1))).(eq_ind C (CHead c1 k u) (\lambda -(c0: C).((eq C (CHead c2 k u) (CHead d1 (Flat f) u1)) \to ((csuba g c1 c2) -\to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c0 (CHead d2 (Flat f) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) (\lambda (H3: -(eq C (CHead c2 k u) (CHead d1 (Flat f) u1))).(let H4 \def (f_equal C T -(\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) -\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c2 k u) (CHead d1 (Flat -f) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e in C return -(\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow -k0])) (CHead c2 k u) (CHead d1 (Flat f) u1) H3) in ((let H6 \def (f_equal C C -(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) -\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u) (CHead d1 -(Flat f) u1) H3) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Flat f)) \to ((eq -T u u1) \to ((csuba g c1 c0) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(eq C (CHead c1 k u) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1)))))))) (\lambda (H7: (eq K k (Flat f))).(eq_ind K -(Flat f) (\lambda (k0: K).((eq T u u1) \to ((csuba g c1 d1) \to (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k0 u) (CHead d2 (Flat f) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) (\lambda (H8: -(eq T u u1)).(eq_ind T u1 (\lambda (t: T).((csuba g c1 d1) \to (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 (Flat f) t) (CHead d2 (Flat -f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (\lambda (H9: -(csuba g c1 d1)).(ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(eq C -(CHead c1 (Flat f) u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))) c1 u1 (refl_equal C (CHead c1 (Flat f) u1)) H9)) u -(sym_eq T u u1 H8))) k (sym_eq K k (Flat f) H7))) c2 (sym_eq C c2 d1 H6))) -H5)) H4))) c H1 H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u H2) \Rightarrow -(\lambda (H3: (eq C (CHead c1 (Bind Abst) t) c)).(\lambda (H4: (eq C (CHead -c2 (Bind Abbr) u) (CHead d1 (Flat f) u1))).(eq_ind C (CHead c1 (Bind Abst) t) -(\lambda (c0: C).((eq C (CHead c2 (Bind Abbr) u) (CHead d1 (Flat f) u1)) \to -((csuba g c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u a) \to -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c0 (CHead d2 (Flat f) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))) (\lambda (H5: -(eq C (CHead c2 (Bind Abbr) u) (CHead d1 (Flat f) u1))).(let H6 \def (eq_ind -C (CHead c2 (Bind Abbr) u) (\lambda (e: C).(match e in C return (\lambda (_: -C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match -k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat -_) \Rightarrow False])])) I (CHead d1 (Flat f) u1) H5) in (False_ind ((csuba -g c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u a) \to (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 (Bind Abst) t) (CHead d2 -(Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) H6))) -c H3 H4 H0 H1 H2)))]) in (H0 (refl_equal C c) (refl_equal C (CHead d1 (Flat -f) u1))))))))). - -theorem csuba_gen_bind_rev: - \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall -(v1: T).((csuba g c2 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))))) -\def - \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda -(v1: T).(\lambda (H: (csuba g c2 (CHead e1 (Bind b1) v1))).(let H0 \def -(match H in csuba return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csuba -? c c0)).((eq C c c2) \to ((eq C c0 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind -b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 -e1)))))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) -c2)).(\lambda (H1: (eq C (CSort n) (CHead e1 (Bind b1) v1))).(eq_ind C (CSort -n) (\lambda (c: C).((eq C (CSort n) (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind -b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 -e1))))))) (\lambda (H2: (eq C (CSort n) (CHead e1 (Bind b1) v1))).(let H3 -\def (eq_ind C (CSort n) (\lambda (e: C).(match e in C return (\lambda (_: -C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow -False])) I (CHead e1 (Bind b1) v1) H2) in (False_ind (ex2_3 B C T (\lambda -(b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CSort n) (CHead e2 (Bind b2) -v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))) -H3))) c2 H0 H1))) | (csuba_head c1 c0 H0 k u) \Rightarrow (\lambda (H1: (eq C -(CHead c1 k u) c2)).(\lambda (H2: (eq C (CHead c0 k u) (CHead e1 (Bind b1) -v1))).(eq_ind C (CHead c1 k u) (\lambda (c: C).((eq C (CHead c0 k u) (CHead -e1 (Bind b1) v1)) \to ((csuba g c1 c0) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))) -(\lambda (H3: (eq C (CHead c0 k u) (CHead e1 (Bind b1) v1))).(let H4 \def -(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with -[(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c0 k u) -(CHead e1 (Bind b1) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e: -C).(match e in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | -(CHead _ k0 _) \Rightarrow k0])) (CHead c0 k u) (CHead e1 (Bind b1) v1) H3) -in ((let H6 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) -(CHead c0 k u) (CHead e1 (Bind b1) v1) H3) in (eq_ind C e1 (\lambda (c: -C).((eq K k (Bind b1)) \to ((eq T u v1) \to ((csuba g c1 c) \to (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c1 k u) -(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csuba g e2 e1))))))))) (\lambda (H7: (eq K k (Bind b1))).(eq_ind K (Bind -b1) (\lambda (k0: K).((eq T u v1) \to ((csuba g c1 e1) \to (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c1 k0 u) -(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csuba g e2 e1)))))))) (\lambda (H8: (eq T u v1)).(eq_ind T v1 (\lambda -(t: T).((csuba g c1 e1) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: -C).(\lambda (v2: T).(eq C (CHead c1 (Bind b1) t) (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))) -(\lambda (H9: (csuba g c1 e1)).(let H10 \def (eq_ind T u (\lambda (t: T).(eq -C (CHead c1 k t) c2)) H1 v1 H8) in (let H11 \def (eq_ind K k (\lambda (k0: -K).(eq C (CHead c1 k0 v1) c2)) H10 (Bind b1) H7) in (let H12 \def (eq_ind_r C -c2 (\lambda (c: C).(csuba g c (CHead e1 (Bind b1) v1))) H (CHead c1 (Bind b1) -v1) H11) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda -(v2: T).(eq C (CHead c1 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda -(_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))) b1 c1 v1 -(refl_equal C (CHead c1 (Bind b1) v1)) H9))))) u (sym_eq T u v1 H8))) k -(sym_eq K k (Bind b1) H7))) c0 (sym_eq C c0 e1 H6))) H5)) H4))) c2 H1 H2 -H0))) | (csuba_abst c1 c0 H0 t a H1 u H2) \Rightarrow (\lambda (H3: (eq C -(CHead c1 (Bind Abst) t) c2)).(\lambda (H4: (eq C (CHead c0 (Bind Abbr) u) -(CHead e1 (Bind b1) v1))).(eq_ind C (CHead c1 (Bind Abst) t) (\lambda (c: -C).((eq C (CHead c0 (Bind Abbr) u) (CHead e1 (Bind b1) v1)) \to ((csuba g c1 -c0) \to ((arity g c1 t (asucc g a)) \to ((arity g c0 u a) \to (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind -b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 -e1)))))))))) (\lambda (H5: (eq C (CHead c0 (Bind Abbr) u) (CHead e1 (Bind b1) -v1))).(let H6 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda -(_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) -(CHead c0 (Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in ((let H7 \def -(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with -[(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k in K return -(\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow -Abbr])])) (CHead c0 (Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in ((let H8 -\def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) -with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 -(Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in (eq_ind C e1 (\lambda (c: -C).((eq B Abbr b1) \to ((eq T u v1) \to ((csuba g c1 c) \to ((arity g c1 t -(asucc g a)) \to ((arity g c u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda -(e2: C).(\lambda (v2: T).(eq C (CHead c1 (Bind Abst) t) (CHead e2 (Bind b2) -v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 -e1))))))))))) (\lambda (H9: (eq B Abbr b1)).(eq_ind B Abbr (\lambda (_: -B).((eq T u v1) \to ((csuba g c1 e1) \to ((arity g c1 t (asucc g a)) \to -((arity g e1 u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda -(v2: T).(eq C (CHead c1 (Bind Abst) t) (CHead e2 (Bind b2) v2))))) (\lambda -(_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))))) (\lambda -(H10: (eq T u v1)).(eq_ind T v1 (\lambda (t0: T).((csuba g c1 e1) \to ((arity -g c1 t (asucc g a)) \to ((arity g e1 t0 a) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c1 (Bind Abst) t) (CHead e2 -(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g -e2 e1))))))))) (\lambda (H11: (csuba g c1 e1)).(\lambda (_: (arity g c1 t -(asucc g a))).(\lambda (_: (arity g e1 v1 a)).(let H14 \def (eq_ind_r C c2 -(\lambda (c: C).(csuba g c (CHead e1 (Bind b1) v1))) H (CHead c1 (Bind Abst) -t) H3) in (let H15 \def (eq_ind_r B b1 (\lambda (b: B).(csuba g (CHead c1 -(Bind Abst) t) (CHead e1 (Bind b) v1))) H14 Abbr H9) in (ex2_3_intro B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c1 (Bind -Abst) t) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g e2 e1)))) Abst c1 t (refl_equal C (CHead c1 (Bind -Abst) t)) H11)))))) u (sym_eq T u v1 H10))) b1 H9)) c0 (sym_eq C c0 e1 H8))) -H7)) H6))) c2 H3 H4 H0 H1 H2)))]) in (H0 (refl_equal C c2) (refl_equal C -(CHead e1 (Bind b1) v1))))))))). - -theorem csuba_clear_trans: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csuba g c2 c1) \to -(\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) -(\lambda (e2: C).(clear c2 e2)))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csuba g c2 -c1)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear -c0 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear c -e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) -e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csuba g e2 e1)) -(\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: -C).(\lambda (H0: (csuba g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c4 -e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear c3 -e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: -(clear (CHead c4 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c4 k0 u) -e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear -(CHead c3 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c4 (Bind -b) u) e1)).(eq_ind_r C (CHead c4 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda -(e2: C).(csuba g e2 c)) (\lambda (e2: C).(clear (CHead c3 (Bind b) u) e2)))) -(ex_intro2 C (\lambda (e2: C).(csuba g e2 (CHead c4 (Bind b) u))) (\lambda -(e2: C).(clear (CHead c3 (Bind b) u) e2)) (CHead c3 (Bind b) u) (csuba_head g -c3 c4 H0 (Bind b) u) (clear_bind b c3 u)) e1 (clear_gen_bind b c4 e1 u H3)))) -(\lambda (f: F).(\lambda (H3: (clear (CHead c4 (Flat f) u) e1)).(let H4 \def -(H1 e1 (clear_gen_flat f c4 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g -e2 e1)) (\lambda (e2: C).(clear c3 e2)) (ex2 C (\lambda (e2: C).(csuba g e2 -e1)) (\lambda (e2: C).(clear (CHead c3 (Flat f) u) e2))) (\lambda (x: -C).(\lambda (H5: (csuba g x e1)).(\lambda (H6: (clear c3 x)).(ex_intro2 C -(\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear (CHead c3 (Flat f) -u) e2)) x H5 (clear_flat c3 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: -C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: ((\forall -(e1: C).((clear c4 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda -(e2: C).(clear c3 e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (H2: -(arity g c3 t (asucc g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u -a)).(\lambda (e1: C).(\lambda (H4: (clear (CHead c4 (Bind Abbr) u) -e1)).(eq_ind_r C (CHead c4 (Bind Abbr) u) (\lambda (c: C).(ex2 C (\lambda -(e2: C).(csuba g e2 c)) (\lambda (e2: C).(clear (CHead c3 (Bind Abst) t) -e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g e2 (CHead c4 (Bind Abbr) u))) -(\lambda (e2: C).(clear (CHead c3 (Bind Abst) t) e2)) (CHead c3 (Bind Abst) -t) (csuba_abst g c3 c4 H0 t a H2 u H3) (clear_bind Abst c3 t)) e1 -(clear_gen_bind Abbr c4 e1 u H4))))))))))))) c2 c1 H)))). - -theorem csuba_drop_abst_rev: - \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop i -O c1 (CHead d1 (Bind Abst) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g -c2 c1) \to (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1)))))))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: -C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abst) u)) \to (\forall (g: -G).(\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda (d2: C).(drop n O c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))))))))) -(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda (H: (drop O O c1 -(CHead d1 (Bind Abst) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: -(csuba g c2 c1)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c2 c)) H0 -(CHead d1 (Bind Abst) u) (drop_gen_refl c1 (CHead d1 (Bind Abst) u) H)) in -(let H_x \def (csuba_gen_abst_rev g d1 c2 u H1) in (let H2 \def H_x in -(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x: C).(\lambda (H3: -(eq C c2 (CHead x (Bind Abst) u))).(\lambda (H4: (csuba g x d1)).(eq_ind_r C -(CHead x (Bind Abst) u) (\lambda (c: C).(ex2 C (\lambda (d2: C).(drop O O c -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))) (ex_intro2 C -(\lambda (d2: C).(drop O O (CHead x (Bind Abst) u) (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1)) x (drop_refl (CHead x (Bind Abst) u)) H4) -c2 H3)))) H2))))))))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: -C).(\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abst) u)) -\to (\forall (g: G).(\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda -(d2: C).(drop n O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1)))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: -C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abst) u)) \to (\forall -(g: G).(\forall (c2: C).((csuba g c2 c) \to (ex2 C (\lambda (d2: C).(drop (S -n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))))))) -(\lambda (n0: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop (S n) -O (CSort n0) (CHead d1 (Bind Abst) u))).(\lambda (g: G).(\lambda (c2: -C).(\lambda (_: (csuba g c2 (CSort n0))).(and3_ind (eq C (CHead d1 (Bind -Abst) u) (CSort n0)) (eq nat (S n) O) (eq nat O O) (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1))) (\lambda (H2: (eq C (CHead d1 (Bind Abst) u) (CSort n0))).(\lambda (_: -(eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (match H2 in eq -return (\lambda (c: C).(\lambda (_: (eq ? ? c)).((eq C c (CSort n0)) \to (ex2 -C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)))))) with [refl_equal \Rightarrow (\lambda (H5: (eq C -(CHead d1 (Bind Abst) u) (CSort n0))).(let H6 \def (eq_ind C (CHead d1 (Bind -Abst) u) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with -[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n0) -H5) in (False_ind (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) H6)))]) in (H5 (refl_equal C -(CSort n0))))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind Abst) u) -H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).(\forall (u: -T).((drop (S n) O c (CHead d1 (Bind Abst) u)) \to (\forall (g: G).(\forall -(c2: C).((csuba g c2 c) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead -d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))))))))).(\lambda (k: -K).(\lambda (t: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n) -O (CHead c k t) (CHead d1 (Bind Abst) u))).(\lambda (g: G).(\lambda (c2: -C).(\lambda (H2: (csuba g c2 (CHead c k t))).(K_ind (\lambda (k0: K).((csuba -g c2 (CHead c k0 t)) \to ((drop (r k0 n) O c (CHead d1 (Bind Abst) u)) \to -(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda -(d2: C).(csuba g d2 d1)))))) (\lambda (b: B).(\lambda (H3: (csuba g c2 (CHead -c (Bind b) t))).(\lambda (H4: (drop (r (Bind b) n) O c (CHead d1 (Bind Abst) -u))).(B_ind (\lambda (b0: B).((csuba g c2 (CHead c (Bind b0) t)) \to ((drop -(r (Bind b0) n) O c (CHead d1 (Bind Abst) u)) \to (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1)))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Abbr) t))).(\lambda (H6: -(drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abst) u))).(let H_x \def -(csuba_gen_abbr_rev g c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba -g d2 c))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq -C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g c t a))))) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (H8: (ex2 C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba -g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) -(\lambda (d2: C).(csuba g d2 c)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x: -C).(\lambda (H9: (eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H10: (csuba g x -c)).(eq_ind_r C (CHead x (Bind Abbr) t) (\lambda (c0: C).(ex2 C (\lambda (d2: -C).(drop (S n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1)))) (let H11 \def (H c d1 u H6 g x H10) in (ex2_ind C (\lambda (d2: -C).(drop n O x (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x0: C).(\lambda (H12: -(drop n O x (CHead x0 (Bind Abst) u))).(\lambda (H13: (csuba g x0 d1)).(let -H14 \def (refl_equal nat (r (Bind Abst) n)) in (let H15 \def (eq_ind nat n -(\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abst) u))) H12 (r (Bind Abst) -n) H14) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) -t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop -(Bind Abbr) n x (CHead x0 (Bind Abst) u) H15 t) H13)))))) H11)) c2 H9)))) -H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g c t a)))))).(ex4_3_ind C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))) (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: -A).(\lambda (H9: (eq C c2 (CHead x0 (Bind Abst) x1))).(\lambda (H10: (csuba g -x0 c)).(\lambda (_: (arity g x0 x1 (asucc g x2))).(\lambda (_: (arity g c t -x2)).(eq_ind_r C (CHead x0 (Bind Abst) x1) (\lambda (c0: C).(ex2 C (\lambda -(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g -d2 d1)))) (let H13 \def (H c d1 u H6 g x0 H10) in (ex2_ind C (\lambda (d2: -C).(drop n O x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x: C).(\lambda -(H14: (drop n O x0 (CHead x (Bind Abst) u))).(\lambda (H15: (csuba g x -d1)).(let H16 \def (refl_equal nat (r (Bind Abst) n)) in (let H17 \def -(eq_ind nat n (\lambda (n0: nat).(drop n0 O x0 (CHead x (Bind Abst) u))) H14 -(r (Bind Abst) n) H16) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead -x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1)) x (drop_drop (Bind Abst) n x0 (CHead x (Bind Abst) u) H17 x1) H15)))))) -H13)) c2 H9)))))))) H8)) H7))))) (\lambda (H5: (csuba g c2 (CHead c (Bind -Abst) t))).(\lambda (H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abst) -u))).(let H_x \def (csuba_gen_abst_rev g c c2 t H5) in (let H7 \def H_x in -(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: -C).(csuba g d2 c)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x: C).(\lambda (H8: -(eq C c2 (CHead x (Bind Abst) t))).(\lambda (H9: (csuba g x c)).(eq_ind_r C -(CHead x (Bind Abst) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) -O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))) (let H10 -\def (H c d1 u H6 g x H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead -d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u))) (\lambda -(d2: C).(csuba g d2 d1))) (\lambda (x0: C).(\lambda (H11: (drop n O x (CHead -x0 (Bind Abst) u))).(\lambda (H12: (csuba g x0 d1)).(let H13 \def (refl_equal -nat (r (Bind Abst) n)) in (let H14 \def (eq_ind nat n (\lambda (n0: -nat).(drop n0 O x (CHead x0 (Bind Abst) u))) H11 (r (Bind Abst) n) H13) in -(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop (Bind Abst) -n x (CHead x0 (Bind Abst) u) H14 t) H12)))))) H10)) c2 H8)))) H7))))) -(\lambda (H5: (csuba g c2 (CHead c (Bind Void) t))).(\lambda (H6: (drop (r -(Bind Void) n) O c (CHead d1 (Bind Abst) u))).(let H_x \def -(csuba_gen_void_rev g c c2 t H5) in (let H7 \def H_x in (ex2_ind C (\lambda -(d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: C).(csuba g d2 c)) -(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda -(d2: C).(csuba g d2 d1))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x -(Bind Void) t))).(\lambda (H9: (csuba g x c)).(eq_ind_r C (CHead x (Bind -Void) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))) (let H10 \def (H c d1 u -H6 g x H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(drop (S n) O -(CHead x (Bind Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g -d2 d1))) (\lambda (x0: C).(\lambda (H11: (drop n O x (CHead x0 (Bind Abst) -u))).(\lambda (H12: (csuba g x0 d1)).(let H13 \def (refl_equal nat (r (Bind -Abst) n)) in (let H14 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x -(CHead x0 (Bind Abst) u))) H11 (r (Bind Abst) n) H13) in (ex_intro2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop (Bind Void) n x (CHead -x0 (Bind Abst) u) H14 t) H12)))))) H10)) c2 H8)))) H7))))) b H3 H4)))) -(\lambda (f: F).(\lambda (H3: (csuba g c2 (CHead c (Flat f) t))).(\lambda -(H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abst) u))).(let H_x \def -(csuba_gen_flat_rev g c c2 t f H3) in (let H5 \def H_x in (ex2_2_ind C T -(\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 c))) (ex2 C (\lambda (d2: C).(drop (S n) -O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda -(x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) -x1))).(\lambda (H7: (csuba g x0 c)).(eq_ind_r C (CHead x0 (Flat f) x1) -(\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))) (let H8 \def (H0 d1 u H4 g x0 -H7) in (ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(drop (S n) O -(CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g -d2 d1))) (\lambda (x: C).(\lambda (H9: (drop (S n) O x0 (CHead x (Bind Abst) -u))).(\lambda (H10: (csuba g x d1)).(ex_intro2 C (\lambda (d2: C).(drop (S n) -O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g -d2 d1)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abst) u) H9 x1) H10)))) -H8)) c2 H6))))) H5)))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abst) u) t n -H1)))))))))))) c1)))) i). - -theorem csuba_drop_abbr_rev: - \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop i -O c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba -g c2 c1) \to (or (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a))))))))))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: -C).(\forall (u1: T).((drop n O c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (g: -G).(\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(drop n -O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: -T).(\lambda (H: (drop O O c1 (CHead d1 (Bind Abbr) u1))).(\lambda (g: -G).(\lambda (c2: C).(\lambda (H0: (csuba g c2 c1)).(let H1 \def (eq_ind C c1 -(\lambda (c: C).(csuba g c2 c)) H0 (CHead d1 (Bind Abbr) u1) (drop_gen_refl -c1 (CHead d1 (Bind Abbr) u1) H)) in (let H_x \def (csuba_gen_abbr_rev g d1 c2 -u1 H1) in (let H2 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H3: -(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: -C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O -O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x -(Bind Abbr) u1))).(\lambda (H5: (csuba g x d1)).(eq_ind_r C (CHead x (Bind -Abbr) u1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a))))))) (or_introl (ex2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abbr) -u1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x (Bind -Abbr) u1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: -C).(drop O O (CHead x (Bind Abbr) u1) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1)) x (drop_refl (CHead x (Bind Abbr) u1)) H5)) c2 -H4)))) H3)) (\lambda (H3: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H4: (eq C c2 (CHead x0 (Bind -Abst) x1))).(\lambda (H5: (csuba g x0 d1)).(\lambda (H6: (arity g x0 x1 -(asucc g x2))).(\lambda (H7: (arity g d1 u1 x2)).(eq_ind_r C (CHead x0 (Bind -Abst) x1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a))))))) (or_intror (ex2 C (\lambda (d2: C).(drop O O (CHead x0 (Bind Abst) -x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind -Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abst) x1) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_refl (CHead x0 (Bind Abst) x1)) H5 -H6 H7)) c2 H4)))))))) H3)) H2))))))))))) (\lambda (n: nat).(\lambda (H: -((\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop n O c1 (CHead d1 -(Bind Abbr) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c2 c1) \to -(or (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop n O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a))))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: -C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abbr) u1)) \to (\forall -(g: G).(\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda (d2: C).(drop -(S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))))))))))) (\lambda (n0: nat).(\lambda (d1: -C).(\lambda (u1: T).(\lambda (H0: (drop (S n) O (CSort n0) (CHead d1 (Bind -Abbr) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (csuba g c2 (CSort -n0))).(and3_ind (eq C (CHead d1 (Bind Abbr) u1) (CSort n0)) (eq nat (S n) O) -(eq nat O O) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (H2: (eq C (CHead d1 (Bind Abbr) u1) (CSort n0))).(\lambda (_: (eq -nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (match H2 in eq return -(\lambda (c: C).(\lambda (_: (eq ? ? c)).((eq C c (CSort n0)) \to (or (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))) with -[refl_equal \Rightarrow (\lambda (H5: (eq C (CHead d1 (Bind Abbr) u1) (CSort -n0))).(let H6 \def (eq_ind C (CHead d1 (Bind Abbr) u1) (\lambda (e: C).(match -e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | -(CHead _ _ _) \Rightarrow True])) I (CSort n0) H5) in (False_ind (or (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) H6)))]) in (H5 -(refl_equal C (CSort n0))))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind -Abbr) u1) H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: -C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abbr) u1)) \to (\forall -(g: G).(\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda (d2: C).(drop -(S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))))))))))).(\lambda (k: K).(\lambda (t: -T).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H1: (drop (S n) O (CHead c k -t) (CHead d1 (Bind Abbr) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: -(csuba g c2 (CHead c k t))).(K_ind (\lambda (k0: K).((csuba g c2 (CHead c k0 -t)) \to ((drop (r k0 n) O c (CHead d1 (Bind Abbr) u1)) \to (or (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))) (\lambda (b: -B).(\lambda (H3: (csuba g c2 (CHead c (Bind b) t))).(\lambda (H4: (drop (r -(Bind b) n) O c (CHead d1 (Bind Abbr) u1))).(B_ind (\lambda (b0: B).((csuba g -c2 (CHead c (Bind b0) t)) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind -Abbr) u1)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a))))))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Abbr) t))).(\lambda (H6: -(drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def -(csuba_gen_abbr_rev g c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba -g d2 c))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq -C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g c t a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind -Abbr) t))) (\lambda (d2: C).(csuba g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq -C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x: -C).(\lambda (H9: (eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H10: (csuba g x -c)).(eq_ind_r C (CHead x (Bind Abbr) t) (\lambda (c0: C).(or (ex2 C (\lambda -(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))))) (let H11 \def (H c d1 u1 H6 g -x H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n -O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind -C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind -Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -(CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: -C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abbr) u1))).(\lambda (H14: -(csuba g x0 d1)).(let H15 \def (refl_equal nat (r (Bind Abst) n)) in (let H16 -\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abbr) -u1))) H13 (r (Bind Abst) n) H15) in (or_introl (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop (Bind Abbr) -n x (CHead x0 (Bind Abbr) u1) H16 t) H14))))))) H12)) (\lambda (H12: (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H13: (drop n O x -(CHead x0 (Bind Abst) x1))).(\lambda (H14: (csuba g x0 d1)).(\lambda (H15: -(arity g x0 x1 (asucc g x2))).(\lambda (H16: (arity g d1 u1 x2)).(let H17 -\def (refl_equal nat (r (Bind Abst) n)) in (let H18 \def (eq_ind nat n -(\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abst) x1))) H13 (r (Bind -Abst) n) H17) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -(CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_drop (Bind Abbr) n -x (CHead x0 (Bind Abst) x1) H18 t) H14 H15 H16))))))))))) H12)) H11)) c2 -H9)))) H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))))).(ex4_3_ind C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc -g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))) -(or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 -(CHead x0 (Bind Abst) x1))).(\lambda (H10: (csuba g x0 c)).(\lambda (_: -(arity g x0 x1 (asucc g x2))).(\lambda (_: (arity g c t x2)).(eq_ind_r C -(CHead x0 (Bind Abst) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop -(S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))))) (let H13 \def (H c d1 u1 H6 g x0 H10) in -(or_ind (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (H14: (ex2 C (\lambda (d2: C).(drop n -O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind -C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind -Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -(CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x: -C).(\lambda (H15: (drop n O x0 (CHead x (Bind Abbr) u1))).(\lambda (H16: -(csuba g x d1)).(let H17 \def (refl_equal nat (r (Bind Abst) n)) in (let H18 -\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x0 (CHead x (Bind Abbr) -u1))) H15 (r (Bind Abst) n) H17) in (or_introl (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop (Bind -Abst) n x0 (CHead x (Bind Abbr) u1) H18 x1) H16))))))) H14)) (\lambda (H14: -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: -A).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Abst) x4))).(\lambda (H16: -(csuba g x3 d1)).(\lambda (H17: (arity g x3 x4 (asucc g x5))).(\lambda (H18: -(arity g d1 u1 x5)).(let H19 \def (refl_equal nat (r (Bind Abst) n)) in (let -H20 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x0 (CHead x3 (Bind Abst) -x4))) H15 (r (Bind Abst) n) H19) in (or_intror (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x3 x4 x5 -(drop_drop (Bind Abst) n x0 (CHead x3 (Bind Abst) x4) H20 x1) H16 H17 -H18))))))))))) H14)) H13)) c2 H9)))))))) H8)) H7))))) (\lambda (H5: (csuba g -c2 (CHead c (Bind Abst) t))).(\lambda (H6: (drop (r (Bind Abst) n) O c (CHead -d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_abst_rev g c c2 t H5) in (let -H7 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) -t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C (\lambda (d2: C).(drop (S n) -O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead -d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x -(Bind Abst) t))).(\lambda (H9: (csuba g x c)).(eq_ind_r C (CHead x (Bind -Abst) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind (ex2 C (\lambda -(d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n -O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead -x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H11: -(ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) -u1))).(\lambda (H13: (csuba g x0 d1)).(let H14 \def (refl_equal nat (r (Bind -Abst) n)) in (let H15 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x -(CHead x0 (Bind Abbr) u1))) H12 (r (Bind Abst) n) H14) in (or_introl (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O -(CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g -d2 d1)) x0 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abbr) u1) H15 t) -H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) -x1))).(\lambda (H13: (csuba g x0 d1)).(\lambda (H14: (arity g x0 x1 (asucc g -x2))).(\lambda (H15: (arity g d1 u1 x2)).(let H16 \def (refl_equal nat (r -(Bind Abst) n)) in (let H17 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O -x (CHead x0 (Bind Abst) x1))) H12 (r (Bind Abst) n) H16) in (or_intror (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) x0 x1 x2 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abst) x1) H17 t) -H13 H14 H15))))))))))) H11)) H10)) c2 H8)))) H7))))) (\lambda (H5: (csuba g -c2 (CHead c (Bind Void) t))).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead -d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_void_rev g c c2 t H5) in (let -H7 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) -t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C (\lambda (d2: C).(drop (S n) -O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead -d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x -(Bind Void) t))).(\lambda (H9: (csuba g x c)).(eq_ind_r C (CHead x (Bind -Void) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind (ex2 C (\lambda -(d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n -O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead -x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H11: -(ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) -u1))).(\lambda (H13: (csuba g x0 d1)).(let H14 \def (refl_equal nat (r (Bind -Abst) n)) in (let H15 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x -(CHead x0 (Bind Abbr) u1))) H12 (r (Bind Abst) n) H14) in (or_introl (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O -(CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g -d2 d1)) x0 (drop_drop (Bind Void) n x (CHead x0 (Bind Abbr) u1) H15 t) -H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Void) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) -x1))).(\lambda (H13: (csuba g x0 d1)).(\lambda (H14: (arity g x0 x1 (asucc g -x2))).(\lambda (H15: (arity g d1 u1 x2)).(let H16 \def (refl_equal nat (r -(Bind Abst) n)) in (let H17 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O -x (CHead x0 (Bind Abst) x1))) H12 (r (Bind Abst) n) H16) in (or_intror (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) x0 x1 x2 (drop_drop (Bind Void) n x (CHead x0 (Bind Abst) x1) H17 t) -H13 H14 H15))))))))))) H11)) H10)) c2 H8)))) H7))))) b H3 H4)))) (\lambda (f: -F).(\lambda (H3: (csuba g c2 (CHead c (Flat f) t))).(\lambda (H4: (drop (r -(Flat f) n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_flat_rev -g c c2 t f H3) in (let H5 \def H_x in (ex2_2_ind C T (\lambda (d2: -C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 c))) (or (ex2 C (\lambda (d2: C).(drop (S n) O -c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead -d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: -(eq C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g x0 c)).(eq_ind_r C -(CHead x0 (Flat f) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S -n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 -C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))))) (let H8 \def (H0 d1 u1 H4 g x0 H7) in (or_ind -(ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (H9: (ex2 C (\lambda (d2: C).(drop (S -n) O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1)))).(ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S -n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (x: C).(\lambda (H10: (drop (S n) O x0 (CHead x (Bind Abbr) -u1))).(\lambda (H11: (csuba g x d1)).(or_introl (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop (Flat f) n -x0 (CHead x (Bind Abbr) u1) H10 x1) H11))))) H9)) (\lambda (H9: (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: A).(\lambda (H10: (drop (S n) -O x0 (CHead x2 (Bind Abst) x3))).(\lambda (H11: (csuba g x2 d1)).(\lambda -(H12: (arity g x2 x3 (asucc g x4))).(\lambda (H13: (arity g d1 u1 -x4)).(or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 -(Flat f) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))) x2 x3 x4 (drop_drop (Flat f) n x0 (CHead x2 (Bind -Abst) x3) H10 x1) H11 H12 H13))))))))) H9)) H8)) c2 H6))))) H5)))))) k H2 -(drop_gen_drop k c (CHead d1 (Bind Abbr) u1) t n H1)))))))))))) c1)))) i). - -theorem csuba_getl_abst_rev: - \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall -(i: nat).((getl i c1 (CHead d1 (Bind Abst) u)) \to (\forall (c2: C).((csuba g -c2 c1) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1)))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda -(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abst) u))).(let H0 \def -(getl_gen_all c1 (CHead d1 (Bind Abst) u) i H) in (ex2_ind C (\lambda (e: -C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) u))) -(\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))) (\lambda (x: -C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind -Abst) u))).(C_ind (\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 -(Bind Abst) u)) \to (\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda -(d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1)))))))) (\lambda (n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda -(H4: (clear (CSort n) (CHead d1 (Bind Abst) u))).(clear_gen_sort (CHead d1 -(Bind Abst) u) n H4 (\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda -(d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 -(CHead d1 (Bind Abst) u)) \to (\forall (c2: C).((csuba g c2 c1) \to (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: -(drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 -(Bind Abst) u))).(K_ind (\lambda (k0: K).((drop i O c1 (CHead x0 k0 t)) \to -((clear (CHead x0 k0 t) (CHead d1 (Bind Abst) u)) \to (\forall (c2: -C).((csuba g c2 c1) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) (\lambda (b: B).(\lambda -(H5: (drop i O c1 (CHead x0 (Bind b) t))).(\lambda (H6: (clear (CHead x0 -(Bind b) t) (CHead d1 (Bind Abst) u))).(let H7 \def (f_equal C C (\lambda (e: -C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | -(CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) -(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in ((let H8 \def -(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with -[(CSort _) \Rightarrow Abst | (CHead _ k0 _) \Rightarrow (match k0 in K -return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow Abst])])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) -(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in ((let H9 \def -(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with -[(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind -Abst) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abst) u) -t H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 x0)).(\lambda -(c2: C).(\lambda (H12: (csuba g c2 c1)).(let H13 \def (eq_ind_r T t (\lambda -(t0: T).(drop i O c1 (CHead x0 (Bind b) t0))) H5 u H9) in (let H14 \def -(eq_ind_r B b (\lambda (b0: B).(drop i O c1 (CHead x0 (Bind b0) u))) H13 Abst -H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c -(Bind Abst) u))) H14 d1 H11) in (let H16 \def (csuba_drop_abst_rev i c1 d1 u -H15 g c2 H12) in (ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(getl i -c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda -(x1: C).(\lambda (H17: (drop i O c2 (CHead x1 (Bind Abst) u))).(\lambda (H18: -(csuba g x1 d1)).(ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x1 (getl_intro i c2 (CHead x1 -(Bind Abst) u) (CHead x1 (Bind Abst) u) H17 (clear_bind Abst x1 u)) H18)))) -H16)))))))))) H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead -x0 (Flat f) t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind -Abst) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c -(CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 c) \to (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))))))) (nat_ind (\lambda (n: nat).(\forall (x1: C).((drop n -O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) \to (ex2 C -(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)))))))) (\lambda (x1: C).(\lambda (H8: (drop O O x1 (CHead -x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g c2 x1)).(let H10 -\def (eq_ind C x1 (\lambda (c: C).(csuba g c2 c)) H9 (CHead x0 (Flat f) t) -(drop_gen_refl x1 (CHead x0 (Flat f) t) H8)) in (let H_y \def (clear_flat x0 -(CHead d1 (Bind Abst) u) (clear_gen_flat f x0 (CHead d1 (Bind Abst) u) t H6) -f t) in (let H11 \def (csuba_clear_trans g (CHead x0 (Flat f) t) c2 H10 -(CHead d1 (Bind Abst) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g e2 -(CHead d1 (Bind Abst) u))) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda -(d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1))) (\lambda (x2: C).(\lambda (H12: (csuba g x2 (CHead d1 (Bind Abst) -u))).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abst_rev g d1 x2 -u H12) in (let H14 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(\lambda (x3: C).(\lambda (H15: (eq C x2 (CHead x3 (Bind Abst) u))).(\lambda -(H16: (csuba g x3 d1)).(let H17 \def (eq_ind C x2 (\lambda (c: C).(clear c2 -c)) H13 (CHead x3 (Bind Abst) u) H15) in (ex_intro2 C (\lambda (d2: C).(getl -O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x3 -(getl_intro O c2 (CHead x3 (Bind Abst) u) c2 (drop_refl c2) H17) H16))))) -H14)))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x1: -C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) -\to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda -(d2: C).(csuba g d2 d1))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n) O -x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g c2 -x1)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B -C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind -b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead -x0 (Flat f) t))))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x2: B).(\lambda (x3: -C).(\lambda (x4: T).(\lambda (H12: (clear x1 (CHead x3 (Bind x2) -x4))).(\lambda (H13: (drop n O x3 (CHead x0 (Flat f) t))).(let H14 \def -(csuba_clear_trans g x1 c2 H10 (CHead x3 (Bind x2) x4) H12) in (ex2_ind C -(\lambda (e2: C).(csuba g e2 (CHead x3 (Bind x2) x4))) (\lambda (e2: -C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x5: C).(\lambda (H15: -(csuba g x5 (CHead x3 (Bind x2) x4))).(\lambda (H16: (clear c2 x5)).(let H_x -\def (csuba_gen_bind_rev g x2 x3 x5 x4 H15) in (let H17 \def H_x in -(ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x5 -(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csuba g e2 x3)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x6: B).(\lambda (x7: -C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) -x8))).(\lambda (H19: (csuba g x7 x3)).(let H20 \def (eq_ind C x5 (\lambda (c: -C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 -x7 H19) in (ex2_ind C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x9: -C).(\lambda (H22: (getl n x7 (CHead x9 (Bind Abst) u))).(\lambda (H23: (csuba -g x9 d1)).(ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1)) x9 (getl_clear_bind x6 c2 x7 x8 H20 -(CHead x9 (Bind Abst) u) n H22) H23)))) H21)))))))) H17)))))) H14))))))) -H11)))))))) i) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). - -theorem csuba_getl_abbr_rev: - \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).(\forall -(i: nat).((getl i c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba -g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda -(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abbr) u1))).(let H0 \def -(getl_gen_all c1 (CHead d1 (Bind Abbr) u1) i H) in (ex2_ind C (\lambda (e: -C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u1))) -(\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: -(clear x (CHead d1 (Bind Abbr) u1))).(C_ind (\lambda (c: C).((drop i O c1 c) -\to ((clear c (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba g c2 -c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))))) (\lambda -(n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) -(CHead d1 (Bind Abbr) u1))).(clear_gen_sort (CHead d1 (Bind Abbr) u1) n H4 -(\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear -x0 (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba g c2 c1) \to (or -(ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))))))))))).(\lambda (k: K).(\lambda -(t: T).(\lambda (H3: (drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear -(CHead x0 k t) (CHead d1 (Bind Abbr) u1))).(K_ind (\lambda (k0: K).((drop i O -c1 (CHead x0 k0 t)) \to ((clear (CHead x0 k0 t) (CHead d1 (Bind Abbr) u1)) -\to (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i -c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))))))))) (\lambda (b: B).(\lambda (H5: (drop i O c1 (CHead x0 (Bind b) -t))).(\lambda (H6: (clear (CHead x0 (Bind b) t) (CHead d1 (Bind Abbr) -u1))).(let H7 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) -(CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead -d1 (Bind Abbr) u1) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: -C).(match e in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | -(CHead _ k0 _) \Rightarrow (match k0 in K return (\lambda (_: K).B) with -[(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind -Abbr) u1) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) -u1) t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e in C return -(\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t0) -\Rightarrow t0])) (CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) -(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u1) t H6)) in (\lambda (H10: (eq B -Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: C).(\lambda (H12: (csuba -g c2 c1)).(let H13 \def (eq_ind_r T t (\lambda (t0: T).(drop i O c1 (CHead x0 -(Bind b) t0))) H5 u1 H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: -B).(drop i O c1 (CHead x0 (Bind b0) u1))) H13 Abbr H10) in (let H15 \def -(eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c (Bind Abbr) u1))) H14 d1 -H11) in (let H16 \def (csuba_drop_abbr_rev i c1 d1 u1 H15 g c2 H12) in -(or_ind (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H17: (ex2 C (\lambda -(d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1)))).(ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (x1: C).(\lambda (H18: (drop i O c2 (CHead x1 (Bind Abbr) -u1))).(\lambda (H19: (csuba g x1 d1)).(or_introl (ex2 C (\lambda (d2: -C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x1 (getl_intro i c2 -(CHead x1 (Bind Abbr) u1) (CHead x1 (Bind Abbr) u1) H18 (clear_bind Abbr x1 -u1)) H19))))) H17)) (\lambda (H17: (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x1: -C).(\lambda (x2: T).(\lambda (x3: A).(\lambda (H18: (drop i O c2 (CHead x1 -(Bind Abst) x2))).(\lambda (H19: (csuba g x1 d1)).(\lambda (H20: (arity g x1 -x2 (asucc g x3))).(\lambda (H21: (arity g d1 u1 x3)).(or_intror (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x1 x2 x3 -(getl_intro i c2 (CHead x1 (Bind Abst) x2) (CHead x1 (Bind Abst) x2) H18 -(clear_bind Abst x1 x2)) H19 H20 H21))))))))) H17)) H16)))))))))) H8)) -H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead x0 (Flat f) -t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abbr) -u1))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c (CHead x0 -(Flat f) t)) \to (\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda -(d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i -c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))))))) (nat_ind (\lambda (n: nat).(\forall (x1: -C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) -\to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))))) (\lambda -(x1: C).(\lambda (H8: (drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: -C).(\lambda (H9: (csuba g c2 x1)).(let H10 \def (eq_ind C x1 (\lambda (c: -C).(csuba g c2 c)) H9 (CHead x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat -f) t) H8)) in (let H_y \def (clear_flat x0 (CHead d1 (Bind Abbr) u1) -(clear_gen_flat f x0 (CHead d1 (Bind Abbr) u1) t H6) f t) in (let H11 \def -(csuba_clear_trans g (CHead x0 (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u1) -H_y) in (ex2_ind C (\lambda (e2: C).(csuba g e2 (CHead d1 (Bind Abbr) u1))) -(\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (x2: C).(\lambda (H12: (csuba g x2 (CHead d1 (Bind Abbr) -u1))).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abbr_rev g d1 x2 -u1 H12) in (let H14 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C x2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H15: -(ex2 C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x3: C).(\lambda (H16: (eq C x2 (CHead -x3 (Bind Abbr) u1))).(\lambda (H17: (csuba g x3 d1)).(let H18 \def (eq_ind C -x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abbr) u1) H16) in -(or_introl (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C -(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)) x3 (getl_intro O c2 (CHead x3 (Bind Abbr) u1) c2 -(drop_refl c2) H18) H17)))))) H15)) (\lambda (H15: (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(eq C x2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C (\lambda (d2: C).(getl -O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: A).(\lambda (H16: -(eq C x2 (CHead x3 (Bind Abst) x4))).(\lambda (H17: (csuba g x3 d1)).(\lambda -(H18: (arity g x3 x4 (asucc g x5))).(\lambda (H19: (arity g d1 u1 x5)).(let -H20 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abst) -x4) H16) in (or_intror (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O -c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))) x3 x4 x5 (getl_intro O c2 (CHead x3 (Bind Abst) -x4) c2 (drop_refl c2) H20) H17 H18 H19)))))))))) H15)) H14)))))) H11)))))))) -(\lambda (n: nat).(\lambda (H8: ((\forall (x1: C).((drop n O x1 (CHead x0 -(Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) \to (or (ex2 C (\lambda -(d2: C).(getl n c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n -c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S -n) O x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g c2 -x1)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B -C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind -b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead -x0 (Flat f) t))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: (clear x1 -(CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n O x3 (CHead x0 (Flat f) -t))).(let H14 \def (csuba_clear_trans g x1 c2 H10 (CHead x3 (Bind x2) x4) -H12) in (ex2_ind C (\lambda (e2: C).(csuba g e2 (CHead x3 (Bind x2) x4))) -(\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (x5: C).(\lambda (H15: (csuba g x5 (CHead x3 (Bind x2) -x4))).(\lambda (H16: (clear c2 x5)).(let H_x \def (csuba_gen_bind_rev g x2 x3 -x5 x4 H15) in (let H17 \def H_x in (ex2_3_ind B C T (\lambda (b2: B).(\lambda -(e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 x3)))) (or (ex2 C (\lambda -(d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g -d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl -(S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x6: B).(\lambda (x7: -C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) -x8))).(\lambda (H19: (csuba g x7 x3)).(let H20 \def (eq_ind C x5 (\lambda (c: -C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 -x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or -(ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H22: -(ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: -C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S -n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x9: C).(\lambda (H23: (getl n x7 -(CHead x9 (Bind Abbr) u1))).(\lambda (H24: (csuba g x9 d1)).(or_introl (ex2 C -(\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: -C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) u1) n H23) -H24))))) H22)) (\lambda (H22: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (x9: C).(\lambda (x10: T).(\lambda (x11: A).(\lambda (H23: (getl n -x7 (CHead x9 (Bind Abst) x10))).(\lambda (H24: (csuba g x9 d1)).(\lambda -(H25: (arity g x9 x10 (asucc g x11))).(\lambda (H26: (arity g d1 u1 -x11)).(or_intror (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S -n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))) x9 x10 x11 (getl_clear_bind x6 c2 x7 x8 H20 -(CHead x9 (Bind Abst) x10) n H23) H24 H25 H26))))))))) H22)) H21)))))))) -H17)))))) H14))))))) H11)))))))) i) H7))))) k H3 H4))))))) x H1 H2)))) -H0))))))). - -theorem sn3_gen_bind: - \forall (b: B).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c -(THead (Bind b) u t)) \to (land (sn3 c u) (sn3 (CHead c (Bind b) u) t)))))) -\def - \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: -(sn3 c (THead (Bind b) u t))).(insert_eq T (THead (Bind b) u t) (\lambda (t0: -T).(sn3 c t0)) (land (sn3 c u) (sn3 (CHead c (Bind b) u) t)) (\lambda (y: -T).(\lambda (H0: (sn3 c y)).(unintro T t (\lambda (t0: T).((eq T y (THead -(Bind b) u t0)) \to (land (sn3 c u) (sn3 (CHead c (Bind b) u) t0)))) (unintro -T u (\lambda (t0: T).(\forall (x: T).((eq T y (THead (Bind b) t0 x)) \to -(land (sn3 c t0) (sn3 (CHead c (Bind b) t0) x))))) (sn3_ind c (\lambda (t0: -T).(\forall (x: T).(\forall (x0: T).((eq T t0 (THead (Bind b) x x0)) \to -(land (sn3 c x) (sn3 (CHead c (Bind b) x) x0)))))) (\lambda (t1: T).(\lambda -(H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 -c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) -\to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).(\forall -(x0: T).((eq T t2 (THead (Bind b) x x0)) \to (land (sn3 c x) (sn3 (CHead c -(Bind b) x) x0)))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T -t1 (THead (Bind b) x x0))).(let H4 \def (eq_ind T t1 (\lambda (t0: -T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c -t0 t2) \to (\forall (x1: T).(\forall (x2: T).((eq T t2 (THead (Bind b) x1 -x2)) \to (land (sn3 c x1) (sn3 (CHead c (Bind b) x1) x2))))))))) H2 (THead -(Bind b) x x0) H3) in (let H5 \def (eq_ind T t1 (\lambda (t0: T).(\forall -(t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to -(sn3 c t2))))) H1 (THead (Bind b) x x0) H3) in (conj (sn3 c x) (sn3 (CHead c -(Bind b) x) x0) (sn3_sing c x (\lambda (t2: T).(\lambda (H6: (((eq T x t2) -\to (\forall (P: Prop).P)))).(\lambda (H7: (pr3 c x t2)).(let H8 \def (H4 -(THead (Bind b) t2 x0) (\lambda (H8: (eq T (THead (Bind b) x x0) (THead (Bind -b) t2 x0))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | -(TLRef _) \Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Bind b) x -x0) (THead (Bind b) t2 x0) H8) in (let H10 \def (eq_ind_r T t2 (\lambda (t0: -T).(pr3 c x t0)) H7 x H9) in (let H11 \def (eq_ind_r T t2 (\lambda (t0: -T).((eq T x t0) \to (\forall (P0: Prop).P0))) H6 x H9) in (H11 (refl_equal T -x) P)))))) (pr3_head_12 c x t2 H7 (Bind b) x0 x0 (pr3_refl (CHead c (Bind b) -t2) x0)) t2 x0 (refl_equal T (THead (Bind b) t2 x0))) in (and_ind (sn3 c t2) -(sn3 (CHead c (Bind b) t2) x0) (sn3 c t2) (\lambda (H9: (sn3 c t2)).(\lambda -(_: (sn3 (CHead c (Bind b) t2) x0)).H9)) H8)))))) (sn3_sing (CHead c (Bind b) -x) x0 (\lambda (t2: T).(\lambda (H6: (((eq T x0 t2) \to (\forall (P: -Prop).P)))).(\lambda (H7: (pr3 (CHead c (Bind b) x) x0 t2)).(let H8 \def (H4 -(THead (Bind b) x t2) (\lambda (H8: (eq T (THead (Bind b) x x0) (THead (Bind -b) x t2))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | -(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind b) x -x0) (THead (Bind b) x t2) H8) in (let H10 \def (eq_ind_r T t2 (\lambda (t0: -T).(pr3 (CHead c (Bind b) x) x0 t0)) H7 x0 H9) in (let H11 \def (eq_ind_r T -t2 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H6 x0 H9) in -(H11 (refl_equal T x0) P)))))) (pr3_head_12 c x x (pr3_refl c x) (Bind b) x0 -t2 H7) x t2 (refl_equal T (THead (Bind b) x t2))) in (and_ind (sn3 c x) (sn3 -(CHead c (Bind b) x) t2) (sn3 (CHead c (Bind b) x) t2) (\lambda (_: (sn3 c -x)).(\lambda (H10: (sn3 (CHead c (Bind b) x) t2)).H10)) H8))))))))))))))) y -H0))))) H))))). - -theorem sn3_gen_head: - \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c -(THead k u t)) \to (sn3 c u))))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (c: C).(\forall (u: -T).(\forall (t: T).((sn3 c (THead k0 u t)) \to (sn3 c u)))))) (\lambda (b: -B).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead -(Bind b) u t))).(let H_x \def (sn3_gen_bind b c u t H) in (let H0 \def H_x in -(and_ind (sn3 c u) (sn3 (CHead c (Bind b) u) t) (sn3 c u) (\lambda (H1: (sn3 -c u)).(\lambda (_: (sn3 (CHead c (Bind b) u) t)).H1)) H0)))))))) (\lambda (f: -F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead -(Flat f) u t))).(let H_x \def (sn3_gen_flat f c u t H) in (let H0 \def H_x in -(and_ind (sn3 c u) (sn3 c t) (sn3 c u) (\lambda (H1: (sn3 c u)).(\lambda (_: -(sn3 c t)).H1)) H0)))))))) k). - -theorem sn3_gen_cflat: - \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 (CHead -c (Flat f) u) t) \to (sn3 c t))))) -\def - \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: -(sn3 (CHead c (Flat f) u) t)).(sn3_ind (CHead c (Flat f) u) (\lambda (t0: -T).(sn3 c t0)) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 -t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Flat f) u) t1 t2) \to -(sn3 (CHead c (Flat f) u) t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T -t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Flat f) u) t1 t2) \to -(sn3 c t2)))))).(sn3_sing c t1 (\lambda (t2: T).(\lambda (H2: (((eq T t1 t2) -\to (\forall (P: Prop).P)))).(\lambda (H3: (pr3 c t1 t2)).(H1 t2 H2 -(pr3_cflat c t1 t2 H3 f u))))))))) t H))))). - -theorem sn3_cflat: - \forall (c: C).(\forall (t: T).((sn3 c t) \to (\forall (f: F).(\forall (u: -T).(sn3 (CHead c (Flat f) u) t))))) -\def - \lambda (c: C).(\lambda (t: T).(\lambda (H: (sn3 c t)).(\lambda (f: -F).(\lambda (u: T).(sn3_ind c (\lambda (t0: T).(sn3 (CHead c (Flat f) u) t0)) -(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall -(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall -(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to -(sn3 (CHead c (Flat f) u) t2)))))).(sn3_pr2_intro (CHead c (Flat f) u) t1 -(\lambda (t2: T).(\lambda (H2: (((eq T t1 t2) \to (\forall (P: -Prop).P)))).(\lambda (H3: (pr2 (CHead c (Flat f) u) t1 t2)).(H1 t2 H2 -(pr3_pr2 c t1 t2 (pr2_gen_cflat f c u t1 t2 H3)))))))))) t H))))). - -theorem sn3_shift: - \forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sn3 c -(THead (Bind b) v t)) \to (sn3 (CHead c (Bind b) v) t))))) -\def - \lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H: -(sn3 c (THead (Bind b) v t))).(let H_x \def (sn3_gen_bind b c v t H) in (let -H0 \def H_x in (and_ind (sn3 c v) (sn3 (CHead c (Bind b) v) t) (sn3 (CHead c -(Bind b) v) t) (\lambda (_: (sn3 c v)).(\lambda (H2: (sn3 (CHead c (Bind b) -v) t)).H2)) H0))))))). - -theorem sn3_change: - \forall (b: B).((not (eq B b Abbr)) \to (\forall (c: C).(\forall (v1: -T).(\forall (t: T).((sn3 (CHead c (Bind b) v1) t) \to (\forall (v2: T).(sn3 -(CHead c (Bind b) v2) t))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abbr))).(\lambda (c: C).(\lambda -(v1: T).(\lambda (t: T).(\lambda (H0: (sn3 (CHead c (Bind b) v1) t)).(\lambda -(v2: T).(sn3_ind (CHead c (Bind b) v1) (\lambda (t0: T).(sn3 (CHead c (Bind -b) v2) t0)) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) -\to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) v1) t1 t2) \to (sn3 -(CHead c (Bind b) v1) t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 -t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) v1) t1 t2) \to -(sn3 (CHead c (Bind b) v2) t2)))))).(sn3_pr2_intro (CHead c (Bind b) v2) t1 -(\lambda (t2: T).(\lambda (H3: (((eq T t1 t2) \to (\forall (P: -Prop).P)))).(\lambda (H4: (pr2 (CHead c (Bind b) v2) t1 t2)).(H2 t2 H3 -(pr3_pr2 (CHead c (Bind b) v1) t1 t2 (pr2_change b H c v2 t1 t2 H4 -v1)))))))))) t H0))))))). - -theorem sn3_cpr3_trans: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall -(k: K).(\forall (t: T).((sn3 (CHead c k u1) t) \to (sn3 (CHead c k u2) -t))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 -u2)).(\lambda (k: K).(\lambda (t: T).(\lambda (H0: (sn3 (CHead c k u1) -t)).(sn3_ind (CHead c k u1) (\lambda (t0: T).(sn3 (CHead c k u2) t0)) -(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall -(P: Prop).P))) \to ((pr3 (CHead c k u1) t1 t2) \to (sn3 (CHead c k u1) -t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: -Prop).P))) \to ((pr3 (CHead c k u1) t1 t2) \to (sn3 (CHead c k u2) -t2)))))).(sn3_sing (CHead c k u2) t1 (\lambda (t2: T).(\lambda (H3: (((eq T -t1 t2) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr3 (CHead c k u2) t1 -t2)).(H2 t2 H3 (pr3_pr3_pr3_t c u1 u2 H t1 t2 k H4))))))))) t H0))))))). - -theorem sn3_bind: - \forall (b: B).(\forall (c: C).(\forall (u: T).((sn3 c u) \to (\forall (t: -T).((sn3 (CHead c (Bind b) u) t) \to (sn3 c (THead (Bind b) u t))))))) -\def - \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (sn3 c -u)).(sn3_ind c (\lambda (t: T).(\forall (t0: T).((sn3 (CHead c (Bind b) t) -t0) \to (sn3 c (THead (Bind b) t t0))))) (\lambda (t1: T).(\lambda (_: -((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 -t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to -(\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (t: T).((sn3 (CHead c -(Bind b) t2) t) \to (sn3 c (THead (Bind b) t2 t))))))))).(\lambda (t: -T).(\lambda (H2: (sn3 (CHead c (Bind b) t1) t)).(sn3_ind (CHead c (Bind b) -t1) (\lambda (t0: T).(sn3 c (THead (Bind b) t1 t0))) (\lambda (t2: -T).(\lambda (H3: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: -Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 (CHead c (Bind b) -t1) t3)))))).(\lambda (H4: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: -Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 c (THead (Bind b) -t1 t3))))))).(sn3_sing c (THead (Bind b) t1 t2) (\lambda (t3: T).(\lambda -(H5: (((eq T (THead (Bind b) t1 t2) t3) \to (\forall (P: Prop).P)))).(\lambda -(H6: (pr3 c (THead (Bind b) t1 t2) t3)).(let H_x \def (bind_dec_not b Abst) -in (let H7 \def H_x in (or_ind (eq B b Abst) (not (eq B b Abst)) (sn3 c t3) -(\lambda (H8: (eq B b Abst)).(let H9 \def (eq_ind B b (\lambda (b0: B).(pr3 c -(THead (Bind b0) t1 t2) t3)) H6 Abst H8) in (let H10 \def (eq_ind B b -(\lambda (b0: B).((eq T (THead (Bind b0) t1 t2) t3) \to (\forall (P: -Prop).P))) H5 Abst H8) in (let H11 \def (eq_ind B b (\lambda (b0: B).(\forall -(t4: T).((((eq T t2 t4) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind -b0) t1) t2 t4) \to (sn3 c (THead (Bind b0) t1 t4)))))) H4 Abst H8) in (let -H12 \def (eq_ind B b (\lambda (b0: B).(\forall (t4: T).((((eq T t2 t4) \to -(\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b0) t1) t2 t4) \to (sn3 -(CHead c (Bind b0) t1) t4))))) H3 Abst H8) in (let H13 \def (eq_ind B b -(\lambda (b0: B).(\forall (t4: T).((((eq T t1 t4) \to (\forall (P: Prop).P))) -\to ((pr3 c t1 t4) \to (\forall (t0: T).((sn3 (CHead c (Bind b0) t4) t0) \to -(sn3 c (THead (Bind b0) t4 t0)))))))) H1 Abst H8) in (let H14 \def -(pr3_gen_abst c t1 t2 t3 H9) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: -T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b0: B).(\forall -(u0: T).(pr3 (CHead c (Bind b0) u0) t2 t4))))) (sn3 c t3) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H15: (eq T t3 (THead (Bind Abst) x0 -x1))).(\lambda (H16: (pr3 c t1 x0)).(\lambda (H17: ((\forall (b0: B).(\forall -(u0: T).(pr3 (CHead c (Bind b0) u0) t2 x1))))).(let H18 \def (eq_ind T t3 -(\lambda (t0: T).((eq T (THead (Bind Abst) t1 t2) t0) \to (\forall (P: -Prop).P))) H10 (THead (Bind Abst) x0 x1) H15) in (eq_ind_r T (THead (Bind -Abst) x0 x1) (\lambda (t0: T).(sn3 c t0)) (let H_x0 \def (term_dec t1 x0) in -(let H19 \def H_x0 in (or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: -Prop).P)) (sn3 c (THead (Bind Abst) x0 x1)) (\lambda (H20: (eq T t1 x0)).(let -H21 \def (eq_ind_r T x0 (\lambda (t0: T).((eq T (THead (Bind Abst) t1 t2) -(THead (Bind Abst) t0 x1)) \to (\forall (P: Prop).P))) H18 t1 H20) in (let -H22 \def (eq_ind_r T x0 (\lambda (t0: T).(pr3 c t1 t0)) H16 t1 H20) in -(eq_ind T t1 (\lambda (t0: T).(sn3 c (THead (Bind Abst) t0 x1))) (let H_x1 -\def (term_dec t2 x1) in (let H23 \def H_x1 in (or_ind (eq T t2 x1) ((eq T t2 -x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind Abst) t1 x1)) (\lambda -(H24: (eq T t2 x1)).(let H25 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T -(THead (Bind Abst) t1 t2) (THead (Bind Abst) t1 t0)) \to (\forall (P: -Prop).P))) H21 t2 H24) in (let H26 \def (eq_ind_r T x1 (\lambda (t0: -T).(\forall (b0: B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) t2 t0)))) -H17 t2 H24) in (eq_ind T t2 (\lambda (t0: T).(sn3 c (THead (Bind Abst) t1 -t0))) (H25 (refl_equal T (THead (Bind Abst) t1 t2)) (sn3 c (THead (Bind Abst) -t1 t2))) x1 H24)))) (\lambda (H24: (((eq T t2 x1) \to (\forall (P: -Prop).P)))).(H11 x1 H24 (H17 Abst t1))) H23))) x0 H20)))) (\lambda (H20: -(((eq T t1 x0) \to (\forall (P: Prop).P)))).(let H_x1 \def (term_dec t2 x1) -in (let H21 \def H_x1 in (or_ind (eq T t2 x1) ((eq T t2 x1) \to (\forall (P: -Prop).P)) (sn3 c (THead (Bind Abst) x0 x1)) (\lambda (H22: (eq T t2 x1)).(let -H23 \def (eq_ind_r T x1 (\lambda (t0: T).(\forall (b0: B).(\forall (u0: -T).(pr3 (CHead c (Bind b0) u0) t2 t0)))) H17 t2 H22) in (eq_ind T t2 (\lambda -(t0: T).(sn3 c (THead (Bind Abst) x0 t0))) (H13 x0 H20 H16 t2 (sn3_cpr3_trans -c t1 x0 H16 (Bind Abst) t2 (sn3_sing (CHead c (Bind Abst) t1) t2 H12))) x1 -H22))) (\lambda (H22: (((eq T t2 x1) \to (\forall (P: Prop).P)))).(H13 x0 H20 -H16 x1 (sn3_cpr3_trans c t1 x0 H16 (Bind Abst) x1 (H12 x1 H22 (H17 Abst -t1))))) H21)))) H19))) t3 H15))))))) H14)))))))) (\lambda (H8: (not (eq B b -Abst))).(let H_x0 \def (pr3_gen_bind b H8 c t1 t2 t3 H6) in (let H9 \def H_x0 -in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind -b) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: -T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) t2 t4)))) (pr3 (CHead c (Bind -b) t1) t2 (lift (S O) O t3)) (sn3 c t3) (\lambda (H10: (ex3_2 T T (\lambda -(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 -(CHead c (Bind b) t1) t2 t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda -(t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 (CHead c (Bind b) -t1) t2 t4))) (sn3 c t3) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq -T t3 (THead (Bind b) x0 x1))).(\lambda (H12: (pr3 c t1 x0)).(\lambda (H13: -(pr3 (CHead c (Bind b) t1) t2 x1)).(let H14 \def (eq_ind T t3 (\lambda (t0: -T).((eq T (THead (Bind b) t1 t2) t0) \to (\forall (P: Prop).P))) H5 (THead -(Bind b) x0 x1) H11) in (eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: -T).(sn3 c t0)) (let H_x1 \def (term_dec t1 x0) in (let H15 \def H_x1 in -(or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: Prop).P)) (sn3 c (THead -(Bind b) x0 x1)) (\lambda (H16: (eq T t1 x0)).(let H17 \def (eq_ind_r T x0 -(\lambda (t0: T).((eq T (THead (Bind b) t1 t2) (THead (Bind b) t0 x1)) \to -(\forall (P: Prop).P))) H14 t1 H16) in (let H18 \def (eq_ind_r T x0 (\lambda -(t0: T).(pr3 c t1 t0)) H12 t1 H16) in (eq_ind T t1 (\lambda (t0: T).(sn3 c -(THead (Bind b) t0 x1))) (let H_x2 \def (term_dec t2 x1) in (let H19 \def -H_x2 in (or_ind (eq T t2 x1) ((eq T t2 x1) \to (\forall (P: Prop).P)) (sn3 c -(THead (Bind b) t1 x1)) (\lambda (H20: (eq T t2 x1)).(let H21 \def (eq_ind_r -T x1 (\lambda (t0: T).((eq T (THead (Bind b) t1 t2) (THead (Bind b) t1 t0)) -\to (\forall (P: Prop).P))) H17 t2 H20) in (let H22 \def (eq_ind_r T x1 -(\lambda (t0: T).(pr3 (CHead c (Bind b) t1) t2 t0)) H13 t2 H20) in (eq_ind T -t2 (\lambda (t0: T).(sn3 c (THead (Bind b) t1 t0))) (H21 (refl_equal T (THead -(Bind b) t1 t2)) (sn3 c (THead (Bind b) t1 t2))) x1 H20)))) (\lambda (H20: -(((eq T t2 x1) \to (\forall (P: Prop).P)))).(H4 x1 H20 H13)) H19))) x0 -H16)))) (\lambda (H16: (((eq T t1 x0) \to (\forall (P: Prop).P)))).(let H_x2 -\def (term_dec t2 x1) in (let H17 \def H_x2 in (or_ind (eq T t2 x1) ((eq T t2 -x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind b) x0 x1)) (\lambda (H18: -(eq T t2 x1)).(let H19 \def (eq_ind_r T x1 (\lambda (t0: T).(pr3 (CHead c -(Bind b) t1) t2 t0)) H13 t2 H18) in (eq_ind T t2 (\lambda (t0: T).(sn3 c -(THead (Bind b) x0 t0))) (H1 x0 H16 H12 t2 (sn3_cpr3_trans c t1 x0 H12 (Bind -b) t2 (sn3_sing (CHead c (Bind b) t1) t2 H3))) x1 H18))) (\lambda (H18: (((eq -T t2 x1) \to (\forall (P: Prop).P)))).(H1 x0 H16 H12 x1 (sn3_cpr3_trans c t1 -x0 H12 (Bind b) x1 (H3 x1 H18 H13)))) H17)))) H15))) t3 H11))))))) H10)) -(\lambda (H10: (pr3 (CHead c (Bind b) t1) t2 (lift (S O) O -t3))).(sn3_gen_lift (CHead c (Bind b) t1) t3 (S O) O (sn3_pr3_trans (CHead c -(Bind b) t1) t2 (sn3_pr2_intro (CHead c (Bind b) t1) t2 (\lambda (t0: -T).(\lambda (H11: (((eq T t2 t0) \to (\forall (P: Prop).P)))).(\lambda (H12: -(pr2 (CHead c (Bind b) t1) t2 t0)).(H3 t0 H11 (pr3_pr2 (CHead c (Bind b) t1) -t2 t0 H12)))))) (lift (S O) O t3) H10) c (drop_drop (Bind b) O c c (drop_refl -c) t1))) H9)))) H7)))))))))) t H2)))))) u H)))). - -theorem sn3_beta: - \forall (c: C).(\forall (v: T).(\forall (t: T).((sn3 c (THead (Bind Abbr) v -t)) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) v (THead -(Bind Abst) w t)))))))) -\def - \lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead -(Bind Abbr) v t))).(insert_eq T (THead (Bind Abbr) v t) (\lambda (t0: T).(sn3 -c t0)) (\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) v (THead -(Bind Abst) w t))))) (\lambda (y: T).(\lambda (H0: (sn3 c y)).(unintro T t -(\lambda (t0: T).((eq T y (THead (Bind Abbr) v t0)) \to (\forall (w: T).((sn3 -c w) \to (sn3 c (THead (Flat Appl) v (THead (Bind Abst) w t0))))))) (unintro -T v (\lambda (t0: T).(\forall (x: T).((eq T y (THead (Bind Abbr) t0 x)) \to -(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) t0 (THead (Bind -Abst) w x)))))))) (sn3_ind c (\lambda (t0: T).(\forall (x: T).(\forall (x0: -T).((eq T t0 (THead (Bind Abbr) x x0)) \to (\forall (w: T).((sn3 c w) \to -(sn3 c (THead (Flat Appl) x (THead (Bind Abst) w x0))))))))) (\lambda (t1: -T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: -Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall -(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to -(\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Bind Abbr) x x0)) \to -(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) x (THead (Bind Abst) -w x0))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t1 -(THead (Bind Abbr) x x0))).(\lambda (w: T).(\lambda (H4: (sn3 c w)).(let H5 -\def (eq_ind T t1 (\lambda (t0: T).(\forall (t2: T).((((eq T t0 t2) \to -(\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (\forall (x1: T).(\forall (x2: -T).((eq T t2 (THead (Bind Abbr) x1 x2)) \to (\forall (w0: T).((sn3 c w0) \to -(sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) w0 x2)))))))))))) H2 (THead -(Bind Abbr) x x0) H3) in (let H6 \def (eq_ind T t1 (\lambda (t0: T).(\forall -(t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to -(sn3 c t2))))) H1 (THead (Bind Abbr) x x0) H3) in (sn3_ind c (\lambda (t0: -T).(sn3 c (THead (Flat Appl) x (THead (Bind Abst) t0 x0)))) (\lambda (t2: -T).(\lambda (H7: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: -Prop).P))) \to ((pr3 c t2 t3) \to (sn3 c t3)))))).(\lambda (H8: ((\forall -(t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to -(sn3 c (THead (Flat Appl) x (THead (Bind Abst) t3 x0)))))))).(sn3_pr2_intro c -(THead (Flat Appl) x (THead (Bind Abst) t2 x0)) (\lambda (t3: T).(\lambda -(H9: (((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t3) \to (\forall -(P: Prop).P)))).(\lambda (H10: (pr2 c (THead (Flat Appl) x (THead (Bind Abst) -t2 x0)) t3)).(let H11 \def (pr2_gen_appl c x (THead (Bind Abst) t2 x0) t3 -H10) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) -(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind Abst) t2 x0) t4)))) -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T (THead (Bind Abst) t2 x0) (THead (Bind Abst) y1 z1)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind -b) u) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c t3) -(\lambda (H12: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) -(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind Abst) t2 x0) -t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) -(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind Abst) t2 x0) t4))) (sn3 -c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H13: (eq T t3 (THead (Flat -Appl) x1 x2))).(\lambda (H14: (pr2 c x x1)).(\lambda (H15: (pr2 c (THead -(Bind Abst) t2 x0) x2)).(let H16 \def (eq_ind T t3 (\lambda (t0: T).((eq T -(THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) \to (\forall (P: -Prop).P))) H9 (THead (Flat Appl) x1 x2) H13) in (eq_ind_r T (THead (Flat -Appl) x1 x2) (\lambda (t0: T).(sn3 c t0)) (let H17 \def (pr2_gen_abst c t2 x0 -x2 H15) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead -(Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t2 u2))) -(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead -c (Bind b) u) x0 t4))))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (x3: -T).(\lambda (x4: T).(\lambda (H18: (eq T x2 (THead (Bind Abst) x3 -x4))).(\lambda (H19: (pr2 c t2 x3)).(\lambda (H20: ((\forall (b: B).(\forall -(u: T).(pr2 (CHead c (Bind b) u) x0 x4))))).(let H21 \def (eq_ind T x2 -(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) -(THead (Flat Appl) x1 t0)) \to (\forall (P: Prop).P))) H16 (THead (Bind Abst) -x3 x4) H18) in (eq_ind_r T (THead (Bind Abst) x3 x4) (\lambda (t0: T).(sn3 c -(THead (Flat Appl) x1 t0))) (let H_x \def (term_dec t2 x3) in (let H22 \def -H_x in (or_ind (eq T t2 x3) ((eq T t2 x3) \to (\forall (P: Prop).P)) (sn3 c -(THead (Flat Appl) x1 (THead (Bind Abst) x3 x4))) (\lambda (H23: (eq T t2 -x3)).(let H24 \def (eq_ind_r T x3 (\lambda (t0: T).((eq T (THead (Flat Appl) -x (THead (Bind Abst) t2 x0)) (THead (Flat Appl) x1 (THead (Bind Abst) t0 -x4))) \to (\forall (P: Prop).P))) H21 t2 H23) in (let H25 \def (eq_ind_r T x3 -(\lambda (t0: T).(pr2 c t2 t0)) H19 t2 H23) in (eq_ind T t2 (\lambda (t0: -T).(sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) t0 x4)))) (let H_x0 \def -(term_dec x x1) in (let H26 \def H_x0 in (or_ind (eq T x x1) ((eq T x x1) \to -(\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) t2 -x4))) (\lambda (H27: (eq T x x1)).(let H28 \def (eq_ind_r T x1 (\lambda (t0: -T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) (THead (Flat Appl) -t0 (THead (Bind Abst) t2 x4))) \to (\forall (P: Prop).P))) H24 x H27) in (let -H29 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H14 x H27) in (eq_ind -T x (\lambda (t0: T).(sn3 c (THead (Flat Appl) t0 (THead (Bind Abst) t2 -x4)))) (let H_x1 \def (term_dec x0 x4) in (let H30 \def H_x1 in (or_ind (eq T -x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x -(THead (Bind Abst) t2 x4))) (\lambda (H31: (eq T x0 x4)).(let H32 \def -(eq_ind_r T x4 (\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind -Abst) t2 x0)) (THead (Flat Appl) x (THead (Bind Abst) t2 t0))) \to (\forall -(P: Prop).P))) H28 x0 H31) in (let H33 \def (eq_ind_r T x4 (\lambda (t0: -T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 -H31) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Flat Appl) x (THead -(Bind Abst) t2 t0)))) (H32 (refl_equal T (THead (Flat Appl) x (THead (Bind -Abst) t2 x0))) (sn3 c (THead (Flat Appl) x (THead (Bind Abst) t2 x0)))) x4 -H31)))) (\lambda (H31: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H5 (THead -(Bind Abbr) x x4) (\lambda (H32: (eq T (THead (Bind Abbr) x x0) (THead (Bind -Abbr) x x4))).(\lambda (P: Prop).(let H33 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | -(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind -Abbr) x x0) (THead (Bind Abbr) x x4) H32) in (let H34 \def (eq_ind_r T x4 -(\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H31 x0 H33) in -(let H35 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: -T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H33) in (H34 (refl_equal T x0) -P)))))) (pr3_pr2 c (THead (Bind Abbr) x x0) (THead (Bind Abbr) x x4) -(pr2_head_2 c x x0 x4 (Bind Abbr) (H20 Abbr x))) x x4 (refl_equal T (THead -(Bind Abbr) x x4)) t2 (sn3_sing c t2 H7))) H30))) x1 H27)))) (\lambda (H27: -(((eq T x x1) \to (\forall (P: Prop).P)))).(H5 (THead (Bind Abbr) x1 x4) -(\lambda (H28: (eq T (THead (Bind Abbr) x x0) (THead (Bind Abbr) x1 -x4))).(\lambda (P: Prop).(let H29 \def (f_equal T T (\lambda (e: T).(match e -in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) -\Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abbr) x x0) -(THead (Bind Abbr) x1 x4) H28) in ((let H30 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | -(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind -Abbr) x x0) (THead (Bind Abbr) x1 x4) H28) in (\lambda (H31: (eq T x -x1)).(let H32 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall -(u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H30) in (let H33 \def -(eq_ind_r T x1 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) -H27 x H31) in (let H34 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H14 -x H31) in (H33 (refl_equal T x) P)))))) H29)))) (pr3_head_12 c x x1 (pr3_pr2 -c x x1 H14) (Bind Abbr) x0 x4 (pr3_pr2 (CHead c (Bind Abbr) x1) x0 x4 (H20 -Abbr x1))) x1 x4 (refl_equal T (THead (Bind Abbr) x1 x4)) t2 (sn3_sing c t2 -H7))) H26))) x3 H23)))) (\lambda (H23: (((eq T t2 x3) \to (\forall (P: -Prop).P)))).(let H_x0 \def (term_dec x x1) in (let H24 \def H_x0 in (or_ind -(eq T x x1) ((eq T x x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) -x1 (THead (Bind Abst) x3 x4))) (\lambda (H25: (eq T x x1)).(let H26 \def -(eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H14 x H25) in (eq_ind T x -(\lambda (t0: T).(sn3 c (THead (Flat Appl) t0 (THead (Bind Abst) x3 x4)))) -(let H_x1 \def (term_dec x0 x4) in (let H27 \def H_x1 in (or_ind (eq T x0 x4) -((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x (THead -(Bind Abst) x3 x4))) (\lambda (H28: (eq T x0 x4)).(let H29 \def (eq_ind_r T -x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -x0 t0)))) H20 x0 H28) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Flat -Appl) x (THead (Bind Abst) x3 t0)))) (H8 x3 H23 (pr3_pr2 c t2 x3 H19)) x4 -H28))) (\lambda (H28: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H5 (THead -(Bind Abbr) x x4) (\lambda (H29: (eq T (THead (Bind Abbr) x x0) (THead (Bind -Abbr) x x4))).(\lambda (P: Prop).(let H30 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | -(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind -Abbr) x x0) (THead (Bind Abbr) x x4) H29) in (let H31 \def (eq_ind_r T x4 -(\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H28 x0 H30) in -(let H32 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: -T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H30) in (H31 (refl_equal T x0) -P)))))) (pr3_pr2 c (THead (Bind Abbr) x x0) (THead (Bind Abbr) x x4) -(pr2_head_2 c x x0 x4 (Bind Abbr) (H20 Abbr x))) x x4 (refl_equal T (THead -(Bind Abbr) x x4)) x3 (H7 x3 H23 (pr3_pr2 c t2 x3 H19)))) H27))) x1 H25))) -(\lambda (H25: (((eq T x x1) \to (\forall (P: Prop).P)))).(H5 (THead (Bind -Abbr) x1 x4) (\lambda (H26: (eq T (THead (Bind Abbr) x x0) (THead (Bind Abbr) -x1 x4))).(\lambda (P: Prop).(let H27 \def (f_equal T T (\lambda (e: T).(match -e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) -\Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abbr) x x0) -(THead (Bind Abbr) x1 x4) H26) in ((let H28 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | -(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind -Abbr) x x0) (THead (Bind Abbr) x1 x4) H26) in (\lambda (H29: (eq T x -x1)).(let H30 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall -(u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H28) in (let H31 \def -(eq_ind_r T x1 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) -H25 x H29) in (let H32 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H14 -x H29) in (H31 (refl_equal T x) P)))))) H27)))) (pr3_head_12 c x x1 (pr3_pr2 -c x x1 H14) (Bind Abbr) x0 x4 (pr3_pr2 (CHead c (Bind Abbr) x1) x0 x4 (H20 -Abbr x1))) x1 x4 (refl_equal T (THead (Bind Abbr) x1 x4)) x3 (H7 x3 H23 -(pr3_pr2 c t2 x3 H19)))) H24)))) H22))) x2 H18))))))) H17)) t3 H13))))))) -H12)) (\lambda (H12: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))))).(ex4_4_ind T T T -T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind Abst) t2 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind -Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -z1 t4))))))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (x4: T).(\lambda (H13: (eq T (THead (Bind Abst) t2 x0) (THead -(Bind Abst) x1 x2))).(\lambda (H14: (eq T t3 (THead (Bind Abbr) x3 -x4))).(\lambda (H15: (pr2 c x x3)).(\lambda (H16: ((\forall (b: B).(\forall -(u: T).(pr2 (CHead c (Bind b) u) x2 x4))))).(let H17 \def (eq_ind T t3 -(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) -\to (\forall (P: Prop).P))) H9 (THead (Bind Abbr) x3 x4) H14) in (eq_ind_r T -(THead (Bind Abbr) x3 x4) (\lambda (t0: T).(sn3 c t0)) (let H18 \def (f_equal -T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ t0 _) \Rightarrow t0])) -(THead (Bind Abst) t2 x0) (THead (Bind Abst) x1 x2) H13) in ((let H19 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t0) -\Rightarrow t0])) (THead (Bind Abst) t2 x0) (THead (Bind Abst) x1 x2) H13) in -(\lambda (_: (eq T t2 x1)).(let H21 \def (eq_ind_r T x2 (\lambda (t0: -T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t0 x4)))) H16 x0 -H19) in (let H_x \def (term_dec x x3) in (let H22 \def H_x in (or_ind (eq T x -x3) ((eq T x x3) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind Abbr) x3 x4)) -(\lambda (H23: (eq T x x3)).(let H24 \def (eq_ind_r T x3 (\lambda (t0: -T).(pr2 c x t0)) H15 x H23) in (eq_ind T x (\lambda (t0: T).(sn3 c (THead -(Bind Abbr) t0 x4))) (let H_x0 \def (term_dec x0 x4) in (let H25 \def H_x0 in -(or_ind (eq T x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead -(Bind Abbr) x x4)) (\lambda (H26: (eq T x0 x4)).(let H27 \def (eq_ind_r T x4 -(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 -t0)))) H21 x0 H26) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Bind Abbr) -x t0))) (sn3_sing c (THead (Bind Abbr) x x0) H6) x4 H26))) (\lambda (H26: -(((eq T x0 x4) \to (\forall (P: Prop).P)))).(H6 (THead (Bind Abbr) x x4) -(\lambda (H27: (eq T (THead (Bind Abbr) x x0) (THead (Bind Abbr) x -x4))).(\lambda (P: Prop).(let H28 \def (f_equal T T (\lambda (e: T).(match e -in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) -\Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) -(THead (Bind Abbr) x x4) H27) in (let H29 \def (eq_ind_r T x4 (\lambda (t0: -T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H26 x0 H28) in (let H30 \def -(eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c -(Bind b) u) x0 t0)))) H21 x0 H28) in (H29 (refl_equal T x0) P)))))) (pr3_pr2 -c (THead (Bind Abbr) x x0) (THead (Bind Abbr) x x4) (pr2_head_2 c x x0 x4 -(Bind Abbr) (H21 Abbr x))))) H25))) x3 H23))) (\lambda (H23: (((eq T x x3) -\to (\forall (P: Prop).P)))).(H6 (THead (Bind Abbr) x3 x4) (\lambda (H24: (eq -T (THead (Bind Abbr) x x0) (THead (Bind Abbr) x3 x4))).(\lambda (P: -Prop).(let H25 \def (f_equal T T (\lambda (e: T).(match e in T return -(\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | -(THead _ t0 _) \Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) -x3 x4) H24) in ((let H26 \def (f_equal T T (\lambda (e: T).(match e in T -return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) -\Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) -(THead (Bind Abbr) x3 x4) H24) in (\lambda (H27: (eq T x x3)).(let H28 \def -(eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c -(Bind b) u) x0 t0)))) H21 x0 H26) in (let H29 \def (eq_ind_r T x3 (\lambda -(t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) H23 x H27) in (let H30 -\def (eq_ind_r T x3 (\lambda (t0: T).(pr2 c x t0)) H15 x H27) in (H29 -(refl_equal T x) P)))))) H25)))) (pr3_head_12 c x x3 (pr3_pr2 c x x3 H15) -(Bind Abbr) x0 x4 (pr3_pr2 (CHead c (Bind Abbr) x3) x0 x4 (H21 Abbr x3))))) -H22)))))) H18)) t3 H14)))))))))) H12)) (\lambda (H12: (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind Abst) t2 x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) -y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t3) -(\lambda (x1: B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda -(x5: T).(\lambda (x6: T).(\lambda (H13: (not (eq B x1 Abst))).(\lambda (H14: -(eq T (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3))).(\lambda (H15: (eq -T t3 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda -(_: (pr2 c x x5)).(\lambda (H17: (pr2 c x2 x6)).(\lambda (H18: (pr2 (CHead c -(Bind x1) x6) x3 x4)).(let H19 \def (eq_ind T t3 (\lambda (t0: T).((eq T -(THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) \to (\forall (P: -Prop).P))) H9 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) -H15) in (eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) -x4)) (\lambda (t0: T).(sn3 c t0)) (let H20 \def (f_equal T B (\lambda (e: -T).(match e in T return (\lambda (_: T).B) with [(TSort _) \Rightarrow Abst | -(TLRef _) \Rightarrow Abst | (THead k _ _) \Rightarrow (match k in K return -(\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow -Abst])])) (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3) H14) in ((let H21 -\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) -with [(TSort _) \Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ t0 _) -\Rightarrow t0])) (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3) H14) in -((let H22 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: -T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ -t0) \Rightarrow t0])) (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3) H14) -in (\lambda (H23: (eq T t2 x2)).(\lambda (H24: (eq B Abst x1)).(let H25 \def -(eq_ind_r T x3 (\lambda (t0: T).(pr2 (CHead c (Bind x1) x6) t0 x4)) H18 x0 -H22) in (let H26 \def (eq_ind_r T x2 (\lambda (t0: T).(pr2 c t0 x6)) H17 t2 -H23) in (let H27 \def (eq_ind_r B x1 (\lambda (b: B).(pr2 (CHead c (Bind b) -x6) x0 x4)) H25 Abst H24) in (let H28 \def (eq_ind_r B x1 (\lambda (b: -B).(not (eq B b Abst))) H13 Abst H24) in (eq_ind B Abst (\lambda (b: B).(sn3 -c (THead (Bind b) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))) (let H29 -\def (match (H28 (refl_equal B Abst)) in False return (\lambda (_: -False).(sn3 c (THead (Bind Abst) x6 (THead (Flat Appl) (lift (S O) O x5) -x4)))) with []) in H29) x1 H24)))))))) H21)) H20)) t3 H15)))))))))))))) H12)) -H11))))))))) w H4))))))))))) y H0))))) H)))). - -theorem nf3_appl_abbr: - \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) w)) \to (\forall (v: T).((sn3 c (THead (Flat Appl) v -(lift (S i) O w))) \to (sn3 c (THead (Flat Appl) v (TLRef i))))))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (v: T).(\lambda (H0: (sn3 c -(THead (Flat Appl) v (lift (S i) O w)))).(insert_eq T (THead (Flat Appl) v -(lift (S i) O w)) (\lambda (t: T).(sn3 c t)) (sn3 c (THead (Flat Appl) v -(TLRef i))) (\lambda (y: T).(\lambda (H1: (sn3 c y)).(unintro T v (\lambda -(t: T).((eq T y (THead (Flat Appl) t (lift (S i) O w))) \to (sn3 c (THead -(Flat Appl) t (TLRef i))))) (sn3_ind c (\lambda (t: T).(\forall (x: T).((eq T -t (THead (Flat Appl) x (lift (S i) O w))) \to (sn3 c (THead (Flat Appl) x -(TLRef i)))))) (\lambda (t1: T).(\lambda (H2: ((\forall (t2: T).((((eq T t1 -t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c -t2)))))).(\lambda (H3: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: -Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).((eq T t2 (THead (Flat -Appl) x (lift (S i) O w))) \to (sn3 c (THead (Flat Appl) x (TLRef -i)))))))))).(\lambda (x: T).(\lambda (H4: (eq T t1 (THead (Flat Appl) x (lift -(S i) O w)))).(let H5 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: -T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall -(x0: T).((eq T t2 (THead (Flat Appl) x0 (lift (S i) O w))) \to (sn3 c (THead -(Flat Appl) x0 (TLRef i))))))))) H3 (THead (Flat Appl) x (lift (S i) O w)) -H4) in (let H6 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t -t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H2 -(THead (Flat Appl) x (lift (S i) O w)) H4) in (sn3_pr2_intro c (THead (Flat -Appl) x (TLRef i)) (\lambda (t2: T).(\lambda (H7: (((eq T (THead (Flat Appl) -x (TLRef i)) t2) \to (\forall (P: Prop).P)))).(\lambda (H8: (pr2 c (THead -(Flat Appl) x (TLRef i)) t2)).(let H9 \def (pr2_gen_appl c x (TLRef i) t2 H8) -in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) -(\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq -T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) -(sn3 c t2) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x -u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3))))).(ex3_2_ind T -T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: -T).(pr2 c (TLRef i) t3))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H12: (pr2 c -x x0)).(\lambda (H13: (pr2 c (TLRef i) x1)).(let H14 \def (eq_ind T t2 -(\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) t) \to (\forall (P: -Prop).P))) H7 (THead (Flat Appl) x0 x1) H11) in (eq_ind_r T (THead (Flat -Appl) x0 x1) (\lambda (t: T).(sn3 c t)) (let H15 \def (pr2_gen_lref c x1 i -H13) in (or_ind (eq T x1 (TLRef i)) (ex2_2 C T (\lambda (d0: C).(\lambda (u: -T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq -T x1 (lift (S i) O u))))) (sn3 c (THead (Flat Appl) x0 x1)) (\lambda (H16: -(eq T x1 (TLRef i))).(let H17 \def (eq_ind T x1 (\lambda (t: T).((eq T (THead -(Flat Appl) x (TLRef i)) (THead (Flat Appl) x0 t)) \to (\forall (P: -Prop).P))) H14 (TLRef i) H16) in (eq_ind_r T (TLRef i) (\lambda (t: T).(sn3 c -(THead (Flat Appl) x0 t))) (let H_x \def (term_dec x x0) in (let H18 \def H_x -in (or_ind (eq T x x0) ((eq T x x0) \to (\forall (P: Prop).P)) (sn3 c (THead -(Flat Appl) x0 (TLRef i))) (\lambda (H19: (eq T x x0)).(let H20 \def -(eq_ind_r T x0 (\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) (THead -(Flat Appl) t (TLRef i))) \to (\forall (P: Prop).P))) H17 x H19) in (let H21 -\def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x H19) in (eq_ind T x -(\lambda (t: T).(sn3 c (THead (Flat Appl) t (TLRef i)))) (H20 (refl_equal T -(THead (Flat Appl) x (TLRef i))) (sn3 c (THead (Flat Appl) x (TLRef i)))) x0 -H19)))) (\lambda (H19: (((eq T x x0) \to (\forall (P: Prop).P)))).(H5 (THead -(Flat Appl) x0 (lift (S i) O w)) (\lambda (H20: (eq T (THead (Flat Appl) x -(lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O w)))).(\lambda (P: -Prop).(let H21 \def (f_equal T T (\lambda (e: T).(match e in T return -(\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | -(THead _ t _) \Rightarrow t])) (THead (Flat Appl) x (lift (S i) O w)) (THead -(Flat Appl) x0 (lift (S i) O w)) H20) in (let H22 \def (eq_ind_r T x0 -(\lambda (t: T).((eq T x t) \to (\forall (P0: Prop).P0))) H19 x H21) in (let -H23 \def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x H21) in (H22 -(refl_equal T x) P)))))) (pr3_pr2 c (THead (Flat Appl) x (lift (S i) O w)) -(THead (Flat Appl) x0 (lift (S i) O w)) (pr2_head_1 c x x0 H12 (Flat Appl) -(lift (S i) O w))) x0 (refl_equal T (THead (Flat Appl) x0 (lift (S i) O -w))))) H18))) x1 H16))) (\lambda (H16: (ex2_2 C T (\lambda (d0: C).(\lambda -(u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(eq T x1 (lift (S i) O u)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda -(u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(eq T x1 (lift (S i) O u)))) (sn3 c (THead (Flat Appl) x0 x1)) (\lambda -(x2: C).(\lambda (x3: T).(\lambda (H17: (getl i c (CHead x2 (Bind Abbr) -x3))).(\lambda (H18: (eq T x1 (lift (S i) O x3))).(let H19 \def (eq_ind T x1 -(\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) (THead (Flat Appl) x0 -t)) \to (\forall (P: Prop).P))) H14 (lift (S i) O x3) H18) in (eq_ind_r T -(lift (S i) O x3) (\lambda (t: T).(sn3 c (THead (Flat Appl) x0 t))) (let H20 -\def (eq_ind C (CHead d (Bind Abbr) w) (\lambda (c0: C).(getl i c c0)) H -(CHead x2 (Bind Abbr) x3) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x2 -(Bind Abbr) x3) H17)) in (let H21 \def (f_equal C C (\lambda (e: C).(match e -in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c0 _ _) -\Rightarrow c0])) (CHead d (Bind Abbr) w) (CHead x2 (Bind Abbr) x3) -(getl_mono c (CHead d (Bind Abbr) w) i H (CHead x2 (Bind Abbr) x3) H17)) in -((let H22 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: -C).T) with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d -(Bind Abbr) w) (CHead x2 (Bind Abbr) x3) (getl_mono c (CHead d (Bind Abbr) w) -i H (CHead x2 (Bind Abbr) x3) H17)) in (\lambda (H23: (eq C d x2)).(let H24 -\def (eq_ind_r T x3 (\lambda (t: T).(getl i c (CHead x2 (Bind Abbr) t))) H20 -w H22) in (eq_ind T w (\lambda (t: T).(sn3 c (THead (Flat Appl) x0 (lift (S -i) O t)))) (let H25 \def (eq_ind_r C x2 (\lambda (c0: C).(getl i c (CHead c0 -(Bind Abbr) w))) H24 d H23) in (let H_x \def (term_dec x x0) in (let H26 \def -H_x in (or_ind (eq T x x0) ((eq T x x0) \to (\forall (P: Prop).P)) (sn3 c -(THead (Flat Appl) x0 (lift (S i) O w))) (\lambda (H27: (eq T x x0)).(let H28 -\def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x H27) in (eq_ind T x -(\lambda (t: T).(sn3 c (THead (Flat Appl) t (lift (S i) O w)))) (sn3_sing c -(THead (Flat Appl) x (lift (S i) O w)) H6) x0 H27))) (\lambda (H27: (((eq T x -x0) \to (\forall (P: Prop).P)))).(H6 (THead (Flat Appl) x0 (lift (S i) O w)) -(\lambda (H28: (eq T (THead (Flat Appl) x (lift (S i) O w)) (THead (Flat -Appl) x0 (lift (S i) O w)))).(\lambda (P: Prop).(let H29 \def (f_equal T T -(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) -(THead (Flat Appl) x (lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O -w)) H28) in (let H30 \def (eq_ind_r T x0 (\lambda (t: T).((eq T x t) \to -(\forall (P0: Prop).P0))) H27 x H29) in (let H31 \def (eq_ind_r T x0 (\lambda -(t: T).(pr2 c x t)) H12 x H29) in (H30 (refl_equal T x) P)))))) (pr3_pr2 c -(THead (Flat Appl) x (lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O -w)) (pr2_head_1 c x x0 H12 (Flat Appl) (lift (S i) O w))))) H26)))) x3 -H22)))) H21))) x1 H18)))))) H16)) H15)) t2 H11))))))) H10)) (\lambda (H10: -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 -t3))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind -b) u) z1 t3))))))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: -T).(\lambda (x3: T).(\lambda (H11: (eq T (TLRef i) (THead (Bind Abst) x0 -x1))).(\lambda (H12: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 c -x x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) -u) x1 x3))))).(let H15 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat -Appl) x (TLRef i)) t) \to (\forall (P: Prop).P))) H7 (THead (Bind Abbr) x2 -x3) H12) in (eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(sn3 c t)) -(let H16 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) x0 -x1) H11) in (False_ind (sn3 c (THead (Bind Abbr) x2 x3)) H16)) t2 -H12)))))))))) H10)) (\lambda (H10: (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind -B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq -T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) -(sn3 c t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 -Abst))).(\lambda (H12: (eq T (TLRef i) (THead (Bind x0) x1 x2))).(\lambda -(H13: (eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) -x3)))).(\lambda (_: (pr2 c x x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: -(pr2 (CHead c (Bind x0) x5) x2 x3)).(let H17 \def (eq_ind T t2 (\lambda (t: -T).((eq T (THead (Flat Appl) x (TLRef i)) t) \to (\forall (P: Prop).P))) H7 -(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) H13) in -(eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) -(\lambda (t: T).(sn3 c t)) (let H18 \def (eq_ind T (TLRef i) (\lambda (ee: -T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I -(THead (Bind x0) x1 x2) H12) in (False_ind (sn3 c (THead (Bind x0) x5 (THead -(Flat Appl) (lift (S O) O x4) x3))) H18)) t2 H13)))))))))))))) H10)) -H9))))))))))))) y H1)))) H0))))))). - -theorem sn3_appl_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u: -T).((sn3 c u) \to (\forall (t: T).(\forall (v: T).((sn3 (CHead c (Bind b) u) -(THead (Flat Appl) (lift (S O) O v) t)) \to (sn3 c (THead (Flat Appl) v -(THead (Bind b) u t)))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (c: C).(\lambda -(u: T).(\lambda (H0: (sn3 c u)).(sn3_ind c (\lambda (t: T).(\forall (t0: -T).(\forall (v: T).((sn3 (CHead c (Bind b) t) (THead (Flat Appl) (lift (S O) -O v) t0)) \to (sn3 c (THead (Flat Appl) v (THead (Bind b) t t0))))))) -(\lambda (t1: T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall -(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall -(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to -(\forall (t: T).(\forall (v: T).((sn3 (CHead c (Bind b) t2) (THead (Flat -Appl) (lift (S O) O v) t)) \to (sn3 c (THead (Flat Appl) v (THead (Bind b) t2 -t))))))))))).(\lambda (t: T).(\lambda (v: T).(\lambda (H3: (sn3 (CHead c -(Bind b) t1) (THead (Flat Appl) (lift (S O) O v) t))).(insert_eq T (THead -(Flat Appl) (lift (S O) O v) t) (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) -t0)) (sn3 c (THead (Flat Appl) v (THead (Bind b) t1 t))) (\lambda (y: -T).(\lambda (H4: (sn3 (CHead c (Bind b) t1) y)).(unintro T t (\lambda (t0: -T).((eq T y (THead (Flat Appl) (lift (S O) O v) t0)) \to (sn3 c (THead (Flat -Appl) v (THead (Bind b) t1 t0))))) (unintro T v (\lambda (t0: T).(\forall (x: -T).((eq T y (THead (Flat Appl) (lift (S O) O t0) x)) \to (sn3 c (THead (Flat -Appl) t0 (THead (Bind b) t1 x)))))) (sn3_ind (CHead c (Bind b) t1) (\lambda -(t0: T).(\forall (x: T).(\forall (x0: T).((eq T t0 (THead (Flat Appl) (lift -(S O) O x) x0)) \to (sn3 c (THead (Flat Appl) x (THead (Bind b) t1 x0))))))) -(\lambda (t2: T).(\lambda (H5: ((\forall (t3: T).((((eq T t2 t3) \to (\forall -(P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 (CHead c (Bind -b) t1) t3)))))).(\lambda (H6: ((\forall (t3: T).((((eq T t2 t3) \to (\forall -(P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (\forall (x: -T).(\forall (x0: T).((eq T t3 (THead (Flat Appl) (lift (S O) O x) x0)) \to -(sn3 c (THead (Flat Appl) x (THead (Bind b) t1 x0))))))))))).(\lambda (x: -T).(\lambda (x0: T).(\lambda (H7: (eq T t2 (THead (Flat Appl) (lift (S O) O -x) x0))).(let H8 \def (eq_ind T t2 (\lambda (t0: T).(\forall (t3: T).((((eq T -t0 t3) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t0 t3) \to -(\forall (x1: T).(\forall (x2: T).((eq T t3 (THead (Flat Appl) (lift (S O) O -x1) x2)) \to (sn3 c (THead (Flat Appl) x1 (THead (Bind b) t1 x2)))))))))) H6 -(THead (Flat Appl) (lift (S O) O x) x0) H7) in (let H9 \def (eq_ind T t2 -(\lambda (t0: T).(\forall (t3: T).((((eq T t0 t3) \to (\forall (P: Prop).P))) -\to ((pr3 (CHead c (Bind b) t1) t0 t3) \to (sn3 (CHead c (Bind b) t1) t3))))) -H5 (THead (Flat Appl) (lift (S O) O x) x0) H7) in (sn3_pr2_intro c (THead -(Flat Appl) x (THead (Bind b) t1 x0)) (\lambda (t3: T).(\lambda (H10: (((eq T -(THead (Flat Appl) x (THead (Bind b) t1 x0)) t3) \to (\forall (P: -Prop).P)))).(\lambda (H11: (pr2 c (THead (Flat Appl) x (THead (Bind b) t1 -x0)) t3)).(let H12 \def (pr2_gen_appl c x (THead (Bind b) t1 x0) t3 H11) in -(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat -Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: -T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) t4)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind b) t1 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind -Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t4: T).(\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) -u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead -(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind -b0) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b0) y2) z1 z2)))))))) (sn3 c t3) -(\lambda (H13: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) -(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) -t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) -(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) t4))) (sn3 c -t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H14: (eq T t3 (THead (Flat -Appl) x1 x2))).(\lambda (H15: (pr2 c x x1)).(\lambda (H16: (pr2 c (THead -(Bind b) t1 x0) x2)).(let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T -(THead (Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) -H10 (THead (Flat Appl) x1 x2) H14) in (eq_ind_r T (THead (Flat Appl) x1 x2) -(\lambda (t0: T).(sn3 c t0)) (let H_x \def (pr3_gen_bind b H c t1 x0 x2) in -(let H18 \def (H_x (pr3_pr2 c (THead (Bind b) t1 x0) x2 H16)) in (or_ind -(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 -t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: -T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) x0 t4)))) (pr3 (CHead c (Bind -b) t1) x0 (lift (S O) O x2)) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (H19: -(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 -t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: -T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) x0 t4))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 t4)))) (\lambda -(u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 -(CHead c (Bind b) t1) x0 t4))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda -(x3: T).(\lambda (x4: T).(\lambda (H20: (eq T x2 (THead (Bind b) x3 -x4))).(\lambda (H21: (pr3 c t1 x3)).(\lambda (H22: (pr3 (CHead c (Bind b) t1) -x0 x4)).(let H23 \def (eq_ind T x2 (\lambda (t0: T).((eq T (THead (Flat Appl) -x (THead (Bind b) t1 x0)) (THead (Flat Appl) x1 t0)) \to (\forall (P: -Prop).P))) H17 (THead (Bind b) x3 x4) H20) in (eq_ind_r T (THead (Bind b) x3 -x4) (\lambda (t0: T).(sn3 c (THead (Flat Appl) x1 t0))) (let H_x0 \def -(term_dec t1 x3) in (let H24 \def H_x0 in (or_ind (eq T t1 x3) ((eq T t1 x3) -\to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Bind b) x3 -x4))) (\lambda (H25: (eq T t1 x3)).(let H26 \def (eq_ind_r T x3 (\lambda (t0: -T).((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) (THead (Flat Appl) x1 -(THead (Bind b) t0 x4))) \to (\forall (P: Prop).P))) H23 t1 H25) in (let H27 -\def (eq_ind_r T x3 (\lambda (t0: T).(pr3 c t1 t0)) H21 t1 H25) in (eq_ind T -t1 (\lambda (t0: T).(sn3 c (THead (Flat Appl) x1 (THead (Bind b) t0 x4)))) -(let H_x1 \def (term_dec x0 x4) in (let H28 \def H_x1 in (or_ind (eq T x0 x4) -((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead -(Bind b) t1 x4))) (\lambda (H29: (eq T x0 x4)).(let H30 \def (eq_ind_r T x4 -(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) (THead -(Flat Appl) x1 (THead (Bind b) t1 t0))) \to (\forall (P: Prop).P))) H26 x0 -H29) in (let H31 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 (CHead c (Bind b) -t1) x0 t0)) H22 x0 H29) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Flat -Appl) x1 (THead (Bind b) t1 t0)))) (let H_x2 \def (term_dec x x1) in (let H32 -\def H_x2 in (or_ind (eq T x x1) ((eq T x x1) \to (\forall (P: Prop).P)) (sn3 -c (THead (Flat Appl) x1 (THead (Bind b) t1 x0))) (\lambda (H33: (eq T x -x1)).(let H34 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T (THead (Flat Appl) -x (THead (Bind b) t1 x0)) (THead (Flat Appl) t0 (THead (Bind b) t1 x0))) \to -(\forall (P: Prop).P))) H30 x H33) in (let H35 \def (eq_ind_r T x1 (\lambda -(t0: T).(pr2 c x t0)) H15 x H33) in (eq_ind T x (\lambda (t0: T).(sn3 c -(THead (Flat Appl) t0 (THead (Bind b) t1 x0)))) (H34 (refl_equal T (THead -(Flat Appl) x (THead (Bind b) t1 x0))) (sn3 c (THead (Flat Appl) x (THead -(Bind b) t1 x0)))) x1 H33)))) (\lambda (H33: (((eq T x x1) \to (\forall (P: -Prop).P)))).(H8 (THead (Flat Appl) (lift (S O) O x1) x0) (\lambda (H34: (eq T -(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) -x0))).(\lambda (P: Prop).(let H35 \def (f_equal T T (\lambda (e: T).(match e -in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map -(f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) -\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with -[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) -\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in -lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow -((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match -t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef -(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | -(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) -t4))]) in lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) -\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) -(lift (S O) O x1) x0) H34) in (let H36 \def (eq_ind_r T x1 (\lambda (t0: -T).((eq T x t0) \to (\forall (P0: Prop).P0))) H33 x (lift_inj x x1 (S O) O -H35)) in (let H37 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x -(lift_inj x x1 (S O) O H35)) in (H36 (refl_equal T x) P)))))) (pr3_flat -(CHead c (Bind b) t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift (CHead c -(Bind b) t1) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x x1 -(pr3_pr2 c x x1 H15)) x0 x0 (pr3_refl (CHead c (Bind b) t1) x0) Appl) x1 x0 -(refl_equal T (THead (Flat Appl) (lift (S O) O x1) x0)))) H32))) x4 H29)))) -(\lambda (H29: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H8 (THead (Flat -Appl) (lift (S O) O x1) x4) (\lambda (H30: (eq T (THead (Flat Appl) (lift (S -O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) x4))).(\lambda (P: -Prop).(let H31 \def (f_equal T T (\lambda (e: T).(match e in T return -(\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat -\to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) -\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with -[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) -\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in -lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow -((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match -t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef -(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | -(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) -t4))]) in lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) -\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) -(lift (S O) O x1) x4) H30) in ((let H32 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | -(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat -Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) x4) H30) in -(\lambda (H33: (eq T (lift (S O) O x) (lift (S O) O x1))).(let H34 \def -(eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) -H29 x0 H32) in (let H35 \def (eq_ind_r T x4 (\lambda (t0: T).((eq T (THead -(Flat Appl) x (THead (Bind b) t1 x0)) (THead (Flat Appl) x1 (THead (Bind b) -t1 t0))) \to (\forall (P0: Prop).P0))) H26 x0 H32) in (let H36 \def (eq_ind_r -T x4 (\lambda (t0: T).(pr3 (CHead c (Bind b) t1) x0 t0)) H22 x0 H32) in (let -H37 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T (THead (Flat Appl) x (THead -(Bind b) t1 x0)) (THead (Flat Appl) t0 (THead (Bind b) t1 x0))) \to (\forall -(P0: Prop).P0))) H35 x (lift_inj x x1 (S O) O H33)) in (let H38 \def -(eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) O -H33)) in (H34 (refl_equal T x0) P)))))))) H31)))) (pr3_flat (CHead c (Bind b) -t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift (CHead c (Bind b) t1) c (S -O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) -x0 x4 H22 Appl) x1 x4 (refl_equal T (THead (Flat Appl) (lift (S O) O x1) -x4)))) H28))) x3 H25)))) (\lambda (H25: (((eq T t1 x3) \to (\forall (P: -Prop).P)))).(H2 x3 H25 H21 x4 x1 (sn3_cpr3_trans c t1 x3 H21 (Bind b) (THead -(Flat Appl) (lift (S O) O x1) x4) (let H_x1 \def (term_dec x0 x4) in (let H26 -\def H_x1 in (or_ind (eq T x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) -(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x1) x4)) (\lambda -(H27: (eq T x0 x4)).(let H28 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 (CHead -c (Bind b) t1) x0 t0)) H22 x0 H27) in (eq_ind T x0 (\lambda (t0: T).(sn3 -(CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x1) t0))) (let H_x2 -\def (term_dec x x1) in (let H29 \def H_x2 in (or_ind (eq T x x1) ((eq T x -x1) \to (\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) (THead (Flat Appl) -(lift (S O) O x1) x0)) (\lambda (H30: (eq T x x1)).(let H31 \def (eq_ind_r T -x1 (\lambda (t0: T).(pr2 c x t0)) H15 x H30) in (eq_ind T x (\lambda (t0: -T).(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O t0) x0))) -(sn3_sing (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x) x0) H9) -x1 H30))) (\lambda (H30: (((eq T x x1) \to (\forall (P: Prop).P)))).(H9 -(THead (Flat Appl) (lift (S O) O x1) x0) (\lambda (H31: (eq T (THead (Flat -Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) -x0))).(\lambda (P: Prop).(let H32 \def (f_equal T T (\lambda (e: T).(match e -in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map -(f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) -\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with -[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) -\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in -lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow -((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match -t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef -(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | -(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) -t4))]) in lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) -\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) -(lift (S O) O x1) x0) H31) in (let H33 \def (eq_ind_r T x1 (\lambda (t0: -T).((eq T x t0) \to (\forall (P0: Prop).P0))) H30 x (lift_inj x x1 (S O) O -H32)) in (let H34 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x -(lift_inj x x1 (S O) O H32)) in (H33 (refl_equal T x) P)))))) (pr3_flat -(CHead c (Bind b) t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift (CHead c -(Bind b) t1) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x x1 -(pr3_pr2 c x x1 H15)) x0 x0 (pr3_refl (CHead c (Bind b) t1) x0) Appl))) -H29))) x4 H27))) (\lambda (H27: (((eq T x0 x4) \to (\forall (P: -Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x1) x4) (\lambda (H28: (eq T -(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) -x4))).(\lambda (P: Prop).(let H29 \def (f_equal T T (\lambda (e: T).(match e -in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map -(f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) -\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with -[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) -\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in -lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow -((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match -t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef -(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | -(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) -t4))]) in lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) -\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) -(lift (S O) O x1) x4) H28) in ((let H30 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | -(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat -Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) x4) H28) in -(\lambda (H31: (eq T (lift (S O) O x) (lift (S O) O x1))).(let H32 \def -(eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) -H27 x0 H30) in (let H33 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 (CHead c -(Bind b) t1) x0 t0)) H22 x0 H30) in (let H34 \def (eq_ind_r T x1 (\lambda -(t0: T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) O H31)) in (H32 (refl_equal -T x0) P)))))) H29)))) (pr3_flat (CHead c (Bind b) t1) (lift (S O) O x) (lift -(S O) O x1) (pr3_lift (CHead c (Bind b) t1) c (S O) O (drop_drop (Bind b) O c -c (drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) x0 x4 H22 Appl))) H26)))))) -H24))) x2 H20))))))) H19)) (\lambda (H19: (pr3 (CHead c (Bind b) t1) x0 (lift -(S O) O x2))).(sn3_gen_lift (CHead c (Bind b) t1) (THead (Flat Appl) x1 x2) -(S O) O (eq_ind_r T (THead (Flat Appl) (lift (S O) O x1) (lift (S O) (s (Flat -Appl) O) x2)) (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) t0)) (sn3_pr3_trans -(CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x1) x0) (let H_x0 \def -(term_dec x x1) in (let H20 \def H_x0 in (or_ind (eq T x x1) ((eq T x x1) \to -(\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S -O) O x1) x0)) (\lambda (H21: (eq T x x1)).(let H22 \def (eq_ind_r T x1 -(\lambda (t0: T).(pr2 c x t0)) H15 x H21) in (eq_ind T x (\lambda (t0: -T).(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O t0) x0))) -(sn3_sing (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x) x0) H9) -x1 H21))) (\lambda (H21: (((eq T x x1) \to (\forall (P: Prop).P)))).(H9 -(THead (Flat Appl) (lift (S O) O x1) x0) (\lambda (H22: (eq T (THead (Flat -Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) -x0))).(\lambda (P: Prop).(let H23 \def (f_equal T T (\lambda (e: T).(match e -in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map -(f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) -\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with -[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) -\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in -lref_map) (\lambda (x3: nat).(plus x3 (S O))) O x) | (TLRef _) \Rightarrow -((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match -t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef -(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | -(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) -t4))]) in lref_map) (\lambda (x3: nat).(plus x3 (S O))) O x) | (THead _ t0 _) -\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) -(lift (S O) O x1) x0) H22) in (let H24 \def (eq_ind_r T x1 (\lambda (t0: -T).((eq T x t0) \to (\forall (P0: Prop).P0))) H21 x (lift_inj x x1 (S O) O -H23)) in (let H25 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x -(lift_inj x x1 (S O) O H23)) in (H24 (refl_equal T x) P)))))) (pr3_flat -(CHead c (Bind b) t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift (CHead c -(Bind b) t1) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x x1 -(pr3_pr2 c x x1 H15)) x0 x0 (pr3_refl (CHead c (Bind b) t1) x0) Appl))) -H20))) (THead (Flat Appl) (lift (S O) O x1) (lift (S O) O x2)) (pr3_thin_dx -(CHead c (Bind b) t1) x0 (lift (S O) O x2) H19 (lift (S O) O x1) Appl)) (lift -(S O) O (THead (Flat Appl) x1 x2)) (lift_head (Flat Appl) x1 x2 (S O) O)) c -(drop_drop (Bind b) O c c (drop_refl c) t1))) H18))) t3 H14))))))) H13)) -(\lambda (H13: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: -T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b0: B).(\forall (u0: -T).(pr2 (CHead c (Bind b0) u0) z1 t4))))))))).(ex4_4_ind T T T T (\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -b) t1 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: -T).(\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) u0) z1 t4))))))) -(sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H14: (eq T (THead (Bind b) t1 x0) (THead (Bind Abst) x1 -x2))).(\lambda (H15: (eq T t3 (THead (Bind Abbr) x3 x4))).(\lambda (_: (pr2 c -x x3)).(\lambda (H17: ((\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind -b0) u0) x2 x4))))).(let H18 \def (eq_ind T t3 (\lambda (t0: T).((eq T (THead -(Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) H10 -(THead (Bind Abbr) x3 x4) H15) in (eq_ind_r T (THead (Bind Abbr) x3 x4) -(\lambda (t0: T).(sn3 c t0)) (let H19 \def (f_equal T B (\lambda (e: -T).(match e in T return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | -(TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k in K return -(\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow -b])])) (THead (Bind b) t1 x0) (THead (Bind Abst) x1 x2) H14) in ((let H20 -\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) -with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ t0 _) -\Rightarrow t0])) (THead (Bind b) t1 x0) (THead (Bind Abst) x1 x2) H14) in -((let H21 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: -T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ -t0) \Rightarrow t0])) (THead (Bind b) t1 x0) (THead (Bind Abst) x1 x2) H14) -in (\lambda (_: (eq T t1 x1)).(\lambda (H23: (eq B b Abst)).(let H24 \def -(eq_ind_r T x2 (\lambda (t0: T).(\forall (b0: B).(\forall (u0: T).(pr2 (CHead -c (Bind b0) u0) t0 x4)))) H17 x0 H21) in (let H25 \def (eq_ind B b (\lambda -(b0: B).((eq T (THead (Flat Appl) x (THead (Bind b0) t1 x0)) (THead (Bind -Abbr) x3 x4)) \to (\forall (P: Prop).P))) H18 Abst H23) in (let H26 \def -(eq_ind B b (\lambda (b0: B).(\forall (t4: T).((((eq T (THead (Flat Appl) -(lift (S O) O x) x0) t4) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind -b0) t1) (THead (Flat Appl) (lift (S O) O x) x0) t4) \to (sn3 (CHead c (Bind -b0) t1) t4))))) H9 Abst H23) in (let H27 \def (eq_ind B b (\lambda (b0: -B).(\forall (t4: T).((((eq T (THead (Flat Appl) (lift (S O) O x) x0) t4) \to -(\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b0) t1) (THead (Flat Appl) -(lift (S O) O x) x0) t4) \to (\forall (x5: T).(\forall (x6: T).((eq T t4 -(THead (Flat Appl) (lift (S O) O x5) x6)) \to (sn3 c (THead (Flat Appl) x5 -(THead (Bind b0) t1 x6)))))))))) H8 Abst H23) in (let H28 \def (eq_ind B b -(\lambda (b0: B).(\forall (t4: T).((((eq T t1 t4) \to (\forall (P: Prop).P))) -\to ((pr3 c t1 t4) \to (\forall (t0: T).(\forall (v0: T).((sn3 (CHead c (Bind -b0) t4) (THead (Flat Appl) (lift (S O) O v0) t0)) \to (sn3 c (THead (Flat -Appl) v0 (THead (Bind b0) t4 t0)))))))))) H2 Abst H23) in (let H29 \def -(eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H Abst H23) in (let H30 -\def (match (H29 (refl_equal B Abst)) in False return (\lambda (_: -False).(sn3 c (THead (Bind Abbr) x3 x4))) with []) in H30)))))))))) H20)) -H19)) t3 H15)))))))))) H13)) (\lambda (H13: (ex6_6 B T T T T T (\lambda (b0: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) -t1 x0) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -t3 (THead (Bind b0) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b0) y2) z1 -z2))))))))).(ex6_6_ind B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 -Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead (Bind -b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b0) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b0: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c (Bind b0) y2) z1 z2))))))) (sn3 c t3) (\lambda (x1: -B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: -T).(\lambda (x6: T).(\lambda (_: (not (eq B x1 Abst))).(\lambda (H15: (eq T -(THead (Bind b) t1 x0) (THead (Bind x1) x2 x3))).(\lambda (H16: (eq T t3 -(THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda -(H17: (pr2 c x x5)).(\lambda (H18: (pr2 c x2 x6)).(\lambda (H19: (pr2 (CHead -c (Bind x1) x6) x3 x4)).(let H20 \def (eq_ind T t3 (\lambda (t0: T).((eq T -(THead (Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) -H10 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) H16) in -(eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) -(\lambda (t0: T).(sn3 c t0)) (let H21 \def (f_equal T B (\lambda (e: -T).(match e in T return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | -(TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k in K return -(\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow -b])])) (THead (Bind b) t1 x0) (THead (Bind x1) x2 x3) H15) in ((let H22 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ t0 _) -\Rightarrow t0])) (THead (Bind b) t1 x0) (THead (Bind x1) x2 x3) H15) in -((let H23 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: -T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ -t0) \Rightarrow t0])) (THead (Bind b) t1 x0) (THead (Bind x1) x2 x3) H15) in -(\lambda (H24: (eq T t1 x2)).(\lambda (H25: (eq B b x1)).(let H26 \def -(eq_ind_r T x3 (\lambda (t0: T).(pr2 (CHead c (Bind x1) x6) t0 x4)) H19 x0 -H23) in (let H27 \def (eq_ind_r T x2 (\lambda (t0: T).(pr2 c t0 x6)) H18 t1 -H24) in (let H28 \def (eq_ind_r B x1 (\lambda (b0: B).(pr2 (CHead c (Bind b0) -x6) x0 x4)) H26 b H25) in (eq_ind B b (\lambda (b0: B).(sn3 c (THead (Bind -b0) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))) (sn3_pr3_trans c (THead -(Bind b) t1 (THead (Flat Appl) (lift (S O) O x5) x4)) (sn3_bind b c t1 -(sn3_sing c t1 H1) (THead (Flat Appl) (lift (S O) O x5) x4) (let H_x \def -(term_dec x x5) in (let H29 \def H_x in (or_ind (eq T x x5) ((eq T x x5) \to -(\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S -O) O x5) x4)) (\lambda (H30: (eq T x x5)).(let H31 \def (eq_ind_r T x5 -(\lambda (t0: T).(pr2 c x t0)) H17 x H30) in (eq_ind T x (\lambda (t0: -T).(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O t0) x4))) (let -H_x0 \def (term_dec x0 x4) in (let H32 \def H_x0 in (or_ind (eq T x0 x4) ((eq -T x0 x4) \to (\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) (THead (Flat -Appl) (lift (S O) O x) x4)) (\lambda (H33: (eq T x0 x4)).(let H34 \def -(eq_ind_r T x4 (\lambda (t0: T).(pr2 (CHead c (Bind b) x6) x0 t0)) H28 x0 -H33) in (eq_ind T x0 (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) (THead (Flat -Appl) (lift (S O) O x) t0))) (sn3_sing (CHead c (Bind b) t1) (THead (Flat -Appl) (lift (S O) O x) x0) H9) x4 H33))) (\lambda (H33: (((eq T x0 x4) \to -(\forall (P: Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x) x4) (\lambda -(H34: (eq T (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift -(S O) O x) x4))).(\lambda (P: Prop).(let H35 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | -(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat -Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x) x4) H34) in -(let H36 \def (eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: -Prop).P0))) H33 x0 H35) in (let H37 \def (eq_ind_r T x4 (\lambda (t0: T).(pr2 -(CHead c (Bind b) x6) x0 t0)) H28 x0 H35) in (H36 (refl_equal T x0) P)))))) -(pr3_pr3_pr3_t c t1 x6 (pr3_pr2 c t1 x6 H27) (THead (Flat Appl) (lift (S O) O -x) x0) (THead (Flat Appl) (lift (S O) O x) x4) (Bind b) (pr3_pr2 (CHead c -(Bind b) x6) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift -(S O) O x) x4) (pr2_thin_dx (CHead c (Bind b) x6) x0 x4 H28 (lift (S O) O x) -Appl))))) H32))) x5 H30))) (\lambda (H30: (((eq T x x5) \to (\forall (P: -Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x5) x4) (\lambda (H31: (eq T -(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x5) -x4))).(\lambda (P: Prop).(let H32 \def (f_equal T T (\lambda (e: T).(match e -in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map -(f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) -\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with -[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) -\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in -lref_map) (\lambda (x7: nat).(plus x7 (S O))) O x) | (TLRef _) \Rightarrow -((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match -t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef -(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | -(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) -t4))]) in lref_map) (\lambda (x7: nat).(plus x7 (S O))) O x) | (THead _ t0 _) -\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) -(lift (S O) O x5) x4) H31) in ((let H33 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | -(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat -Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x5) x4) H31) in -(\lambda (H34: (eq T (lift (S O) O x) (lift (S O) O x5))).(let H35 \def -(eq_ind_r T x5 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) -H30 x (lift_inj x x5 (S O) O H34)) in (let H36 \def (eq_ind_r T x5 (\lambda -(t0: T).(pr2 c x t0)) H17 x (lift_inj x x5 (S O) O H34)) in (let H37 \def -(eq_ind_r T x4 (\lambda (t0: T).(pr2 (CHead c (Bind b) x6) x0 t0)) H28 x0 -H33) in (H35 (refl_equal T x) P)))))) H32)))) (pr3_pr3_pr3_t c t1 x6 (pr3_pr2 -c t1 x6 H27) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift -(S O) O x5) x4) (Bind b) (pr3_flat (CHead c (Bind b) x6) (lift (S O) O x) -(lift (S O) O x5) (pr3_lift (CHead c (Bind b) x6) c (S O) O (drop_drop (Bind -b) O c c (drop_refl c) x6) x x5 (pr3_pr2 c x x5 H17)) x0 x4 (pr3_pr2 (CHead c -(Bind b) x6) x0 x4 H28) Appl)))) H29)))) (THead (Bind b) x6 (THead (Flat -Appl) (lift (S O) O x5) x4)) (pr3_pr2 c (THead (Bind b) t1 (THead (Flat Appl) -(lift (S O) O x5) x4)) (THead (Bind b) x6 (THead (Flat Appl) (lift (S O) O -x5) x4)) (pr2_head_1 c t1 x6 H27 (Bind b) (THead (Flat Appl) (lift (S O) O -x5) x4)))) x1 H25))))))) H22)) H21)) t3 H16)))))))))))))) H13)) -H12)))))))))))))) y H4))))) H3))))))) u H0))))). - -theorem sn3_appl_beta: - \forall (c: C).(\forall (u: T).(\forall (v: T).(\forall (t: T).((sn3 c -(THead (Flat Appl) u (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) -\to (sn3 c (THead (Flat Appl) u (THead (Flat Appl) v (THead (Bind Abst) w -t)))))))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (v: T).(\lambda (t: T).(\lambda (H: -(sn3 c (THead (Flat Appl) u (THead (Bind Abbr) v t)))).(\lambda (w: -T).(\lambda (H0: (sn3 c w)).(let H_x \def (sn3_gen_flat Appl c u (THead (Bind -Abbr) v t) H) in (let H1 \def H_x in (and_ind (sn3 c u) (sn3 c (THead (Bind -Abbr) v t)) (sn3 c (THead (Flat Appl) u (THead (Flat Appl) v (THead (Bind -Abst) w t)))) (\lambda (H2: (sn3 c u)).(\lambda (H3: (sn3 c (THead (Bind -Abbr) v t))).(sn3_appl_appl v (THead (Bind Abst) w t) c (sn3_beta c v t H3 w -H0) u H2 (\lambda (u2: T).(\lambda (H4: (pr3 c (THead (Flat Appl) v (THead -(Bind Abst) w t)) u2)).(\lambda (H5: (((iso (THead (Flat Appl) v (THead (Bind -Abst) w t)) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat -Appl) u (THead (Bind Abbr) v t)) H (THead (Flat Appl) u u2) (pr3_thin_dx c -(THead (Bind Abbr) v t) u2 (pr3_iso_beta v w t c u2 H4 H5) u Appl)))))))) -H1))))))))). - -theorem sn3_appls_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u: -T).((sn3 c u) \to (\forall (vs: TList).(\forall (t: T).((sn3 (CHead c (Bind -b) u) (THeads (Flat Appl) (lifts (S O) O vs) t)) \to (sn3 c (THeads (Flat -Appl) vs (THead (Bind b) u t)))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (c: C).(\lambda -(u: T).(\lambda (H0: (sn3 c u)).(\lambda (vs: TList).(TList_ind (\lambda (t: -TList).(\forall (t0: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) (lifts -(S O) O t) t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Bind b) u t0)))))) -(\lambda (t: T).(\lambda (H1: (sn3 (CHead c (Bind b) u) t)).(sn3_bind b c u -H0 t H1))) (\lambda (v: T).(\lambda (vs0: TList).(TList_ind (\lambda (t: -TList).(((\forall (t0: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) -(lifts (S O) O t) t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Bind b) u -t0)))))) \to (\forall (t0: T).((sn3 (CHead c (Bind b) u) (THead (Flat Appl) -(lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O t) t0))) \to (sn3 c -(THead (Flat Appl) v (THeads (Flat Appl) t (THead (Bind b) u t0)))))))) -(\lambda (_: ((\forall (t: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) -(lifts (S O) O TNil) t)) \to (sn3 c (THeads (Flat Appl) TNil (THead (Bind b) -u t))))))).(\lambda (t: T).(\lambda (H2: (sn3 (CHead c (Bind b) u) (THead -(Flat Appl) (lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O TNil) -t)))).(sn3_appl_bind b H c u H0 t v H2)))) (\lambda (t: T).(\lambda (t0: -TList).(\lambda (_: ((((\forall (t1: T).((sn3 (CHead c (Bind b) u) (THeads -(Flat Appl) (lifts (S O) O t0) t1)) \to (sn3 c (THeads (Flat Appl) t0 (THead -(Bind b) u t1)))))) \to (\forall (t1: T).((sn3 (CHead c (Bind b) u) (THead -(Flat Appl) (lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O t0) t1))) \to -(sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (THead (Bind b) u -t1))))))))).(\lambda (H2: ((\forall (t1: T).((sn3 (CHead c (Bind b) u) -(THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)) \to (sn3 c (THeads -(Flat Appl) (TCons t t0) (THead (Bind b) u t1))))))).(\lambda (t1: -T).(\lambda (H3: (sn3 (CHead c (Bind b) u) (THead (Flat Appl) (lift (S O) O -v) (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)))).(let H_x \def -(sn3_gen_flat Appl (CHead c (Bind b) u) (lift (S O) O v) (THeads (Flat Appl) -(lifts (S O) O (TCons t t0)) t1) H3) in (let H4 \def H_x in (and_ind (sn3 -(CHead c (Bind b) u) (lift (S O) O v)) (sn3 (CHead c (Bind b) u) (THeads -(Flat Appl) (lifts (S O) O (TCons t t0)) t1)) (sn3 c (THead (Flat Appl) v -(THeads (Flat Appl) (TCons t t0) (THead (Bind b) u t1)))) (\lambda (H5: (sn3 -(CHead c (Bind b) u) (lift (S O) O v))).(\lambda (H6: (sn3 (CHead c (Bind b) -u) (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1))).(let H_y \def -(sn3_gen_lift (CHead c (Bind b) u) v (S O) O H5 c) in (sn3_appl_appls t -(THead (Bind b) u t1) t0 c (H2 t1 H6) v (H_y (drop_drop (Bind b) O c c -(drop_refl c) u)) (\lambda (u2: T).(\lambda (H7: (pr3 c (THeads (Flat Appl) -(TCons t t0) (THead (Bind b) u t1)) u2)).(\lambda (H8: (((iso (THeads (Flat -Appl) (TCons t t0) (THead (Bind b) u t1)) u2) \to (\forall (P: -Prop).P)))).(let H9 \def (pr3_iso_appls_bind b H (TCons t t0) u t1 c u2 H7 -H8) in (sn3_pr3_trans c (THead (Flat Appl) v (THead (Bind b) u (THeads (Flat -Appl) (lifts (S O) O (TCons t t0)) t1))) (sn3_appl_bind b H c u H0 (THeads -(Flat Appl) (lifts (S O) O (TCons t t0)) t1) v H3) (THead (Flat Appl) v u2) -(pr3_flat c v v (pr3_refl c v) (THead (Bind b) u (THeads (Flat Appl) (lifts -(S O) O (TCons t t0)) t1)) u2 H9 Appl)))))))))) H4))))))))) vs0))) vs)))))). - -theorem sn3_appls_beta: - \forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (us: TList).((sn3 c -(THeads (Flat Appl) us (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c -w) \to (sn3 c (THeads (Flat Appl) us (THead (Flat Appl) v (THead (Bind Abst) -w t)))))))))) -\def - \lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (us: -TList).(TList_ind (\lambda (t0: TList).((sn3 c (THeads (Flat Appl) t0 (THead -(Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads (Flat -Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))) (\lambda (H: -(sn3 c (THead (Bind Abbr) v t))).(\lambda (w: T).(\lambda (H0: (sn3 c -w)).(sn3_beta c v t H w H0)))) (\lambda (u: T).(\lambda (us0: -TList).(TList_ind (\lambda (t0: TList).((((sn3 c (THeads (Flat Appl) t0 -(THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads -(Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))) \to ((sn3 -c (THead (Flat Appl) u (THeads (Flat Appl) t0 (THead (Bind Abbr) v t)))) \to -(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) u (THeads (Flat -Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))))) (\lambda (_: -(((sn3 c (THeads (Flat Appl) TNil (THead (Bind Abbr) v t))) \to (\forall (w: -T).((sn3 c w) \to (sn3 c (THeads (Flat Appl) TNil (THead (Flat Appl) v (THead -(Bind Abst) w t))))))))).(\lambda (H0: (sn3 c (THead (Flat Appl) u (THeads -(Flat Appl) TNil (THead (Bind Abbr) v t))))).(\lambda (w: T).(\lambda (H1: -(sn3 c w)).(sn3_appl_beta c u v t H0 w H1))))) (\lambda (t0: T).(\lambda (t1: -TList).(\lambda (_: (((((sn3 c (THeads (Flat Appl) t1 (THead (Bind Abbr) v -t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads (Flat Appl) t1 (THead -(Flat Appl) v (THead (Bind Abst) w t)))))))) \to ((sn3 c (THead (Flat Appl) u -(THeads (Flat Appl) t1 (THead (Bind Abbr) v t)))) \to (\forall (w: T).((sn3 c -w) \to (sn3 c (THead (Flat Appl) u (THeads (Flat Appl) t1 (THead (Flat Appl) -v (THead (Bind Abst) w t))))))))))).(\lambda (H0: (((sn3 c (THeads (Flat -Appl) (TCons t0 t1) (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) -\to (sn3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v (THead -(Bind Abst) w t))))))))).(\lambda (H1: (sn3 c (THead (Flat Appl) u (THeads -(Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v t))))).(\lambda (w: -T).(\lambda (H2: (sn3 c w)).(let H_x \def (sn3_gen_flat Appl c u (THeads -(Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v t)) H1) in (let H3 \def H_x in -(and_ind (sn3 c u) (sn3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Bind -Abbr) v t))) (sn3 c (THead (Flat Appl) u (THeads (Flat Appl) (TCons t0 t1) -(THead (Flat Appl) v (THead (Bind Abst) w t))))) (\lambda (H4: (sn3 c -u)).(\lambda (H5: (sn3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Bind Abbr) -v t)))).(sn3_appl_appls t0 (THead (Flat Appl) v (THead (Bind Abst) w t)) t1 c -(H0 H5 w H2) u H4 (\lambda (u2: T).(\lambda (H6: (pr3 c (THeads (Flat Appl) -(TCons t0 t1) (THead (Flat Appl) v (THead (Bind Abst) w t))) u2)).(\lambda -(H7: (((iso (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v (THead -(Bind Abst) w t))) u2) \to (\forall (P: Prop).P)))).(let H8 \def -(pr3_iso_appls_beta (TCons t0 t1) v w t c u2 H6 H7) in (sn3_pr3_trans c -(THead (Flat Appl) u (THeads (Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v -t))) H1 (THead (Flat Appl) u u2) (pr3_thin_dx c (THeads (Flat Appl) (TCons t0 -t1) (THead (Bind Abbr) v t)) u2 H8 u Appl))))))))) H3)))))))))) us0))) us)))). - -theorem sn3_appls_abbr: - \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) w)) \to (\forall (vs: TList).((sn3 c (THeads (Flat Appl) -vs (lift (S i) O w))) \to (sn3 c (THeads (Flat Appl) vs (TLRef i))))))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (vs: TList).(TList_ind -(\lambda (t: TList).((sn3 c (THeads (Flat Appl) t (lift (S i) O w))) \to (sn3 -c (THeads (Flat Appl) t (TLRef i))))) (\lambda (H0: (sn3 c (lift (S i) O -w))).(let H_y \def (sn3_gen_lift c w (S i) O H0 d (getl_drop Abbr c d w i H)) -in (sn3_abbr c d w i H H_y))) (\lambda (v: T).(\lambda (vs0: -TList).(TList_ind (\lambda (t: TList).((((sn3 c (THeads (Flat Appl) t (lift -(S i) O w))) \to (sn3 c (THeads (Flat Appl) t (TLRef i))))) \to ((sn3 c -(THead (Flat Appl) v (THeads (Flat Appl) t (lift (S i) O w)))) \to (sn3 c -(THead (Flat Appl) v (THeads (Flat Appl) t (TLRef i))))))) (\lambda (_: -(((sn3 c (THeads (Flat Appl) TNil (lift (S i) O w))) \to (sn3 c (THeads (Flat -Appl) TNil (TLRef i)))))).(\lambda (H1: (sn3 c (THead (Flat Appl) v (THeads -(Flat Appl) TNil (lift (S i) O w))))).(nf3_appl_abbr c d w i H v H1))) -(\lambda (t: T).(\lambda (t0: TList).(\lambda (_: (((((sn3 c (THeads (Flat -Appl) t0 (lift (S i) O w))) \to (sn3 c (THeads (Flat Appl) t0 (TLRef i))))) -\to ((sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (lift (S i) O w)))) -\to (sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (TLRef -i)))))))).(\lambda (H1: (((sn3 c (THeads (Flat Appl) (TCons t t0) (lift (S i) -O w))) \to (sn3 c (THeads (Flat Appl) (TCons t t0) (TLRef i)))))).(\lambda -(H2: (sn3 c (THead (Flat Appl) v (THeads (Flat Appl) (TCons t t0) (lift (S i) -O w))))).(let H_x \def (sn3_gen_flat Appl c v (THeads (Flat Appl) (TCons t -t0) (lift (S i) O w)) H2) in (let H3 \def H_x in (and_ind (sn3 c v) (sn3 c -(THeads (Flat Appl) (TCons t t0) (lift (S i) O w))) (sn3 c (THead (Flat Appl) -v (THeads (Flat Appl) (TCons t t0) (TLRef i)))) (\lambda (H4: (sn3 c -v)).(\lambda (H5: (sn3 c (THeads (Flat Appl) (TCons t t0) (lift (S i) O -w)))).(sn3_appl_appls t (TLRef i) t0 c (H1 H5) v H4 (\lambda (u2: T).(\lambda -(H6: (pr3 c (THeads (Flat Appl) (TCons t t0) (TLRef i)) u2)).(\lambda (H7: -(((iso (THeads (Flat Appl) (TCons t t0) (TLRef i)) u2) \to (\forall (P: -Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) v (THeads (Flat Appl) (TCons -t t0) (lift (S i) O w))) H2 (THead (Flat Appl) v u2) (pr3_thin_dx c (THeads -(Flat Appl) (TCons t t0) (lift (S i) O w)) u2 (pr3_iso_appls_abbr c d w i H -(TCons t t0) u2 H6 H7) v Appl)))))))) H3)))))))) vs0))) vs)))))). - -theorem sn3_gen_def: - \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) v)) \to ((sn3 c (TLRef i)) \to (sn3 d v)))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (H0: (sn3 c (TLRef -i))).(sn3_gen_lift c v (S i) O (sn3_pr3_trans c (TLRef i) H0 (lift (S i) O v) -(pr3_pr2 c (TLRef i) (lift (S i) O v) (pr2_delta c d v i H (TLRef i) (TLRef -i) (pr0_refl (TLRef i)) (lift (S i) O v) (subst0_lref v i)))) d (getl_drop -Abbr c d v i H))))))). - -theorem sn3_cdelta: - \forall (v: T).(\forall (t: T).(\forall (i: nat).(((\forall (w: T).(ex T -(\lambda (u: T).(subst0 i w t u))))) \to (\forall (c: C).(\forall (d: -C).((getl i c (CHead d (Bind Abbr) v)) \to ((sn3 c t) \to (sn3 d v)))))))) -\def - \lambda (v: T).(\lambda (t: T).(\lambda (i: nat).(\lambda (H: ((\forall (w: -T).(ex T (\lambda (u: T).(subst0 i w t u)))))).(let H_x \def (H v) in (let H0 -\def H_x in (ex_ind T (\lambda (u: T).(subst0 i v t u)) (\forall (c: -C).(\forall (d: C).((getl i c (CHead d (Bind Abbr) v)) \to ((sn3 c t) \to -(sn3 d v))))) (\lambda (x: T).(\lambda (H1: (subst0 i v t x)).(subst0_ind -(\lambda (n: nat).(\lambda (t0: T).(\lambda (t1: T).(\lambda (_: T).(\forall -(c: C).(\forall (d: C).((getl n c (CHead d (Bind Abbr) t0)) \to ((sn3 c t1) -\to (sn3 d t0))))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (c: -C).(\lambda (d: C).(\lambda (H2: (getl i0 c (CHead d (Bind Abbr) -v0))).(\lambda (H3: (sn3 c (TLRef i0))).(sn3_gen_def c d v0 i0 H2 H3))))))) -(\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: -nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (H3: ((\forall (c: -C).(\forall (d: C).((getl i0 c (CHead d (Bind Abbr) v0)) \to ((sn3 c u1) \to -(sn3 d v0))))))).(\lambda (t0: T).(\lambda (k: K).(\lambda (c: C).(\lambda -(d: C).(\lambda (H4: (getl i0 c (CHead d (Bind Abbr) v0))).(\lambda (H5: (sn3 -c (THead k u1 t0))).(let H_y \def (sn3_gen_head k c u1 t0 H5) in (H3 c d H4 -H_y)))))))))))))) (\lambda (k: K).(\lambda (v0: T).(\lambda (t2: T).(\lambda -(t1: T).(\lambda (i0: nat).(\lambda (H2: (subst0 (s k i0) v0 t1 t2)).(\lambda -(H3: ((\forall (c: C).(\forall (d: C).((getl (s k i0) c (CHead d (Bind Abbr) -v0)) \to ((sn3 c t1) \to (sn3 d v0))))))).(\lambda (u: T).(\lambda (c: -C).(\lambda (d: C).(\lambda (H4: (getl i0 c (CHead d (Bind Abbr) -v0))).(\lambda (H5: (sn3 c (THead k u t1))).(K_ind (\lambda (k0: K).((subst0 -(s k0 i0) v0 t1 t2) \to (((\forall (c0: C).(\forall (d0: C).((getl (s k0 i0) -c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to (sn3 d0 v0)))))) \to ((sn3 -c (THead k0 u t1)) \to (sn3 d v0))))) (\lambda (b: B).(\lambda (_: (subst0 (s -(Bind b) i0) v0 t1 t2)).(\lambda (H7: ((\forall (c0: C).(\forall (d0: -C).((getl (s (Bind b) i0) c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to -(sn3 d0 v0))))))).(\lambda (H8: (sn3 c (THead (Bind b) u t1))).(let H_x0 \def -(sn3_gen_bind b c u t1 H8) in (let H9 \def H_x0 in (and_ind (sn3 c u) (sn3 -(CHead c (Bind b) u) t1) (sn3 d v0) (\lambda (_: (sn3 c u)).(\lambda (H11: -(sn3 (CHead c (Bind b) u) t1)).(H7 (CHead c (Bind b) u) d (getl_clear_bind b -(CHead c (Bind b) u) c u (clear_bind b c u) (CHead d (Bind Abbr) v0) i0 H4) -H11))) H9))))))) (\lambda (f: F).(\lambda (_: (subst0 (s (Flat f) i0) v0 t1 -t2)).(\lambda (H7: ((\forall (c0: C).(\forall (d0: C).((getl (s (Flat f) i0) -c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to (sn3 d0 v0))))))).(\lambda -(H8: (sn3 c (THead (Flat f) u t1))).(let H_x0 \def (sn3_gen_flat f c u t1 H8) -in (let H9 \def H_x0 in (and_ind (sn3 c u) (sn3 c t1) (sn3 d v0) (\lambda (_: -(sn3 c u)).(\lambda (H11: (sn3 c t1)).(H7 c d H4 H11))) H9))))))) k H2 H3 -H5))))))))))))) (\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda -(i0: nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (H3: ((\forall (c: -C).(\forall (d: C).((getl i0 c (CHead d (Bind Abbr) v0)) \to ((sn3 c u1) \to -(sn3 d v0))))))).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: ((\forall (c: C).(\forall (d: -C).((getl (s k i0) c (CHead d (Bind Abbr) v0)) \to ((sn3 c t1) \to (sn3 d -v0))))))).(\lambda (c: C).(\lambda (d: C).(\lambda (H6: (getl i0 c (CHead d -(Bind Abbr) v0))).(\lambda (H7: (sn3 c (THead k u1 t1))).(let H_y \def -(sn3_gen_head k c u1 t1 H7) in (H3 c d H6 H_y))))))))))))))))) i v t x H1))) -H0)))))). - -inductive csubn: C \to (C \to Prop) \def -| csubn_sort: \forall (n: nat).(csubn (CSort n) (CSort n)) -| csubn_head: \forall (c1: C).(\forall (c2: C).((csubn c1 c2) \to (\forall -(k: K).(\forall (v: T).(csubn (CHead c1 k v) (CHead c2 k v)))))) -| csubn_abst: \forall (c1: C).(\forall (c2: C).((csubn c1 c2) \to (\forall -(v: T).(\forall (w: T).((sn3 c2 w) \to (csubn (CHead c1 (Bind Abst) v) (CHead -c2 (Bind Abbr) w))))))). - -theorem csubc_csuba: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (csuba -g c1 c2)))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 -c2)).(csubc_ind g (\lambda (c: C).(\lambda (c0: C).(csuba g c c0))) (\lambda -(n: nat).(csuba_refl g (CSort n))) (\lambda (c3: C).(\lambda (c4: C).(\lambda -(_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (k: K).(\lambda -(v: T).(csuba_head g c3 c4 H1 k v))))))) (\lambda (c3: C).(\lambda (c4: -C).(\lambda (_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (v: -T).(\lambda (a: A).(\lambda (H2: (sc3 g (asucc g a) c3 v)).(\lambda (w: -T).(\lambda (H3: (sc3 g a c4 w)).(csuba_abst g c3 c4 H1 v a (sc3_arity_gen g -c3 v (asucc g a) H2) w (sc3_arity_gen g c4 w a H3))))))))))) c1 c2 H)))). - -theorem csubc_csubn: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (csubn -c1 c2)))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 -c2)).(csubc_ind g (\lambda (c: C).(\lambda (c0: C).(csubn c c0))) (\lambda -(n: nat).(csubn_sort n)) (\lambda (c3: C).(\lambda (c4: C).(\lambda (_: -(csubc g c3 c4)).(\lambda (H1: (csubn c3 c4)).(\lambda (k: K).(\lambda (v: -T).(csubn_head c3 c4 H1 k v))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda -(_: (csubc g c3 c4)).(\lambda (H1: (csubn c3 c4)).(\lambda (v: T).(\lambda -(a: A).(\lambda (_: (sc3 g (asucc g a) c3 v)).(\lambda (w: T).(\lambda (H3: -(sc3 g a c4 w)).(csubn_abst c3 c4 H1 v w (sc3_sn3 g a c4 w H3))))))))))) c1 -c2 H)))). - -theorem ceq_arity_trans: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((ceqc g c2 c1) \to -(\forall (t: T).(\forall (a: A).((arity g c1 t a) \to (arity g c2 t a))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (ceqc g c2 -c1)).(\lambda (t: T).(\lambda (a: A).(\lambda (H0: (arity g c1 t a)).(let H1 -\def H in (or_ind (csubc g c2 c1) (csubc g c1 c2) (arity g c2 t a) (\lambda -(H2: (csubc g c2 c1)).(csuba_arity_rev g c1 t a H0 c2 (csubc_csuba g c2 c1 -H2))) (\lambda (H2: (csubc g c1 c2)).(csuba_arity g c1 t a H0 c2 (csubc_csuba -g c1 c2 H2))) H1)))))))). - diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/dec.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/dec.ma index 8b1a36ba1..7c6fa73da 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/dec.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/dec.ma @@ -59,6 +59,16 @@ Abst \Rightarrow False | Void \Rightarrow True])) I Abst H) in (False_ind P H0))))) (or_introl (eq B Void Void) ((eq B Void Void) \to (\forall (P: Prop).P)) (refl_equal B Void)) b2)) b1). +theorem bind_dec_not: + \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) (not (eq B b1 b2)))) +\def + \lambda (b1: B).(\lambda (b2: B).(let H_x \def (terms_props__bind_dec b1 b2) +in (let H \def H_x in (or_ind (eq B b1 b2) ((eq B b1 b2) \to (\forall (P: +Prop).P)) (or (eq B b1 b2) ((eq B b1 b2) \to False)) (\lambda (H0: (eq B b1 +b2)).(or_introl (eq B b1 b2) ((eq B b1 b2) \to False) H0)) (\lambda (H0: +(((eq B b1 b2) \to (\forall (P: Prop).P)))).(or_intror (eq B b1 b2) ((eq B b1 +b2) \to False) (\lambda (H1: (eq B b1 b2)).(H0 H1 False)))) H)))). + theorem terms_props__flat_dec: \forall (f1: F).(\forall (f2: F).(or (eq F f1 f2) ((eq F f1 f2) \to (\forall (P: Prop).P)))) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/defs.ma index 5db781439..cc5d91731 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/defs.ma @@ -36,17 +36,6 @@ inductive T: Set \def | TLRef: nat \to T | THead: K \to (T \to (T \to T)). -inductive TList: Set \def -| TNil: TList -| TCons: T \to (TList \to TList). - -definition THeads: - K \to (TList \to (T \to T)) -\def - let rec THeads (k: K) (us: TList) on us: (T \to T) \def (\lambda (t: -T).(match us with [TNil \Rightarrow t | (TCons u ul) \Rightarrow (THead k u -(THeads k ul t))])) in THeads. - definition tweight: T \to nat \def diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/arity/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/arity/defs.ma index 3ce54e042..287c4446c 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/arity/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/arity/defs.ma @@ -20,7 +20,7 @@ include "leq/defs.ma". include "getl/defs.ma". -inductive arity (g:G): C \to (T \to (A \to Prop)) \def +inductive arity (g: G): C \to (T \to (A \to Prop)) \def | arity_sort: \forall (c: C).(\forall (n: nat).(arity g c (TSort n) (ASort O n))) | arity_abbr: \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/fwd.ma deleted file mode 100644 index 99b9dae96..000000000 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/fwd.ma +++ /dev/null @@ -1,336 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/fwd". - -include "csub3/defs.ma". - -theorem csub3_gen_abbr: - \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v: T).((csub3 g -(CHead e1 (Bind Abbr) v) c2) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 -(Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2))))))) -\def - \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda -(H: (csub3 g (CHead e1 (Bind Abbr) v) c2)).(let H0 \def (match H in csub3 -return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csub3 ? c c0)).((eq C c -(CHead e1 (Bind Abbr) v)) \to ((eq C c0 c2) \to (ex2 C (\lambda (e2: C).(eq C -c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))))) with -[(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead e1 (Bind -Abbr) v))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort -n) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) -\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Bind Abbr) -v) H0) in (False_ind ((eq C (CSort n) c2) \to (ex2 C (\lambda (e2: C).(eq C -c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))) H2)) H1))) -| (csub3_head c1 c0 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) -(CHead e1 (Bind Abbr) v))).(\lambda (H2: (eq C (CHead c0 k u) c2)).((let H3 -\def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) -with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) -(CHead e1 (Bind Abbr) v) H1) in ((let H4 \def (f_equal C K (\lambda (e: -C).(match e in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | -(CHead _ k0 _) \Rightarrow k0])) (CHead c1 k u) (CHead e1 (Bind Abbr) v) H1) -in ((let H5 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) -(CHead c1 k u) (CHead e1 (Bind Abbr) v) H1) in (eq_ind C e1 (\lambda (c: -C).((eq K k (Bind Abbr)) \to ((eq T u v) \to ((eq C (CHead c0 k u) c2) \to -((csub3 g c c0) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) -v))) (\lambda (e2: C).(csub3 g e1 e2)))))))) (\lambda (H6: (eq K k (Bind -Abbr))).(eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u v) \to ((eq C (CHead -c0 k0 u) c2) \to ((csub3 g e1 c0) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead -e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2))))))) (\lambda (H7: (eq -T u v)).(eq_ind T v (\lambda (t: T).((eq C (CHead c0 (Bind Abbr) t) c2) \to -((csub3 g e1 c0) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) -v))) (\lambda (e2: C).(csub3 g e1 e2)))))) (\lambda (H8: (eq C (CHead c0 -(Bind Abbr) v) c2)).(eq_ind C (CHead c0 (Bind Abbr) v) (\lambda (c: -C).((csub3 g e1 c0) \to (ex2 C (\lambda (e2: C).(eq C c (CHead e2 (Bind Abbr) -v))) (\lambda (e2: C).(csub3 g e1 e2))))) (\lambda (H9: (csub3 g e1 c0)).(let -H10 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind Abbr) v) c)) -H (CHead c0 (Bind Abbr) v) H8) in (ex_intro2 C (\lambda (e2: C).(eq C (CHead -c0 (Bind Abbr) v) (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 -e2)) c0 (refl_equal C (CHead c0 (Bind Abbr) v)) H9))) c2 H8)) u (sym_eq T u v -H7))) k (sym_eq K k (Bind Abbr) H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3)) H2 -H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) \Rightarrow (\lambda (H2: (eq C -(CHead c1 (Bind Void) u1) (CHead e1 (Bind Abbr) v))).(\lambda (H3: (eq C -(CHead c0 (Bind b) u2) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Void) u1) -(\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k in K return (\lambda -(_: K).Prop) with [(Bind b0) \Rightarrow (match b0 in B return (\lambda (_: -B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void -\Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abbr) -v) H2) in (False_ind ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c1 c0) -\to ((not (eq B b Void)) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind -Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))) H4)) H3 H0 H1))) | -(csub3_abst c1 c0 H0 u t H1) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind -Abst) t) (CHead e1 (Bind Abbr) v))).(\lambda (H3: (eq C (CHead c0 (Bind Abbr) -u) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: -C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow -False | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).Prop) -with [(Bind b) \Rightarrow (match b in B return (\lambda (_: B).Prop) with -[Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | -(Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abbr) v) H2) in (False_ind -((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g c1 c0) \to ((ty3 g c0 u t) -\to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: -C).(csub3 g e1 e2)))))) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CHead e1 -(Bind Abbr) v)) (refl_equal C c2))))))). - -theorem csub3_gen_abst: - \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v1: T).((csub3 g -(CHead e1 (Bind Abst) v1) c2) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead -e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda -(e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: -C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g -e2 v2 v1))))))))) -\def - \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v1: T).(\lambda -(H: (csub3 g (CHead e1 (Bind Abst) v1) c2)).(let H0 \def (match H in csub3 -return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csub3 ? c c0)).((eq C c -(CHead e1 (Bind Abst) v1)) \to ((eq C c0 c2) \to (or (ex2 C (\lambda (e2: -C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) -(ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) -v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: -C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))))) with [(csub3_sort n) -\Rightarrow (\lambda (H0: (eq C (CSort n) (CHead e1 (Bind Abst) -v1))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) -(\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) -\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Bind Abst) -v1) H0) in (False_ind ((eq C (CSort n) c2) \to (or (ex2 C (\lambda (e2: -C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) -(ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) -v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: -C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))) H2)) H1))) | (csub3_head c1 c0 H0 k -u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead e1 (Bind Abst) -v1))).(\lambda (H2: (eq C (CHead c0 k u) c2)).((let H3 \def (f_equal C T -(\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) -\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind -Abst) v1) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e in C -return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) -\Rightarrow k0])) (CHead c1 k u) (CHead e1 (Bind Abst) v1) H1) in ((let H5 -\def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) -with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k -u) (CHead e1 (Bind Abst) v1) H1) in (eq_ind C e1 (\lambda (c: C).((eq K k -(Bind Abst)) \to ((eq T u v1) \to ((eq C (CHead c0 k u) c2) \to ((csub3 g c -c0) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) -(\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: -T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: -T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 -v1)))))))))) (\lambda (H6: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) -(\lambda (k0: K).((eq T u v1) \to ((eq C (CHead c0 k0 u) c2) \to ((csub3 g e1 -c0) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) -(\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: -T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: -T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 -v1))))))))) (\lambda (H7: (eq T u v1)).(eq_ind T v1 (\lambda (t: T).((eq C -(CHead c0 (Bind Abst) t) c2) \to ((csub3 g e1 c0) \to (or (ex2 C (\lambda -(e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 -e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind -Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: -C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))) (\lambda (H8: (eq C (CHead c0 -(Bind Abst) v1) c2)).(eq_ind C (CHead c0 (Bind Abst) v1) (\lambda (c: -C).((csub3 g e1 c0) \to (or (ex2 C (\lambda (e2: C).(eq C c (CHead e2 (Bind -Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: -C).(\lambda (v2: T).(eq C c (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: -C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g -e2 v2 v1))))))) (\lambda (H9: (csub3 g e1 c0)).(let H10 \def (eq_ind_r C c2 -(\lambda (c: C).(csub3 g (CHead e1 (Bind Abst) v1) c)) H (CHead c0 (Bind -Abst) v1) H8) in (or_introl (ex2 C (\lambda (e2: C).(eq C (CHead c0 (Bind -Abst) v1) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) -(ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind Abst) v1) -(CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 -e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))) (ex_intro2 C -(\lambda (e2: C).(eq C (CHead c0 (Bind Abst) v1) (CHead e2 (Bind Abst) v1))) -(\lambda (e2: C).(csub3 g e1 e2)) c0 (refl_equal C (CHead c0 (Bind Abst) v1)) -H9)))) c2 H8)) u (sym_eq T u v1 H7))) k (sym_eq K k (Bind Abst) H6))) c1 -(sym_eq C c1 e1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) -\Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind -Abst) v1))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def -(eq_ind C (CHead c1 (Bind Void) u1) (\lambda (e: C).(match e in C return -(\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind b0) -\Rightarrow (match b0 in B return (\lambda (_: B).Prop) with [Abbr -\Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat -_) \Rightarrow False])])) I (CHead e1 (Bind Abst) v1) H2) in (False_ind ((eq -C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c1 c0) \to ((not (eq B b Void)) -\to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda -(e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C -c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 -e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))) H4)) H3 H0 -H1))) | (csub3_abst c1 c0 H0 u t H1) \Rightarrow (\lambda (H2: (eq C (CHead -c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1))).(\lambda (H3: (eq C (CHead c0 -(Bind Abbr) u) c2)).((let H4 \def (f_equal C T (\lambda (e: C).(match e in C -return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t0) -\Rightarrow t0])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1) H2) in -((let H5 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: -C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead -c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1) H2) in (eq_ind C e1 (\lambda (c: -C).((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g c c0) -\to ((ty3 g c0 u t) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind -Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: -C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: -C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g -e2 v2 v1)))))))))) (\lambda (H6: (eq T t v1)).(eq_ind T v1 (\lambda (t0: -T).((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g e1 c0) \to ((ty3 g c0 u -t0) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) -(\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: -T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: -T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 -v1))))))))) (\lambda (H7: (eq C (CHead c0 (Bind Abbr) u) c2)).(eq_ind C -(CHead c0 (Bind Abbr) u) (\lambda (c: C).((csub3 g e1 c0) \to ((ty3 g c0 u -v1) \to (or (ex2 C (\lambda (e2: C).(eq C c (CHead e2 (Bind Abst) v1))) -(\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: -T).(eq C c (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: -T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 -v1)))))))) (\lambda (H8: (csub3 g e1 c0)).(\lambda (H9: (ty3 g c0 u v1)).(let -H10 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind Abst) v1) -c)) H (CHead c0 (Bind Abbr) u) H7) in (or_intror (ex2 C (\lambda (e2: C).(eq -C (CHead c0 (Bind Abbr) u) (CHead e2 (Bind Abst) v1))) (\lambda (e2: -C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c0 (Bind Abbr) u) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: -C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g -e2 v2 v1)))) (ex3_2_intro C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead -c0 (Bind Abbr) u) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: -T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))) c0 -u (refl_equal C (CHead c0 (Bind Abbr) u)) H8 H9))))) c2 H7)) t (sym_eq T t v1 -H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CHead -e1 (Bind Abst) v1)) (refl_equal C c2))))))). - -theorem csub3_gen_bind: - \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall -(v1: T).((csub3 g (CHead e1 (Bind b1) v1) c2) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))))) -\def - \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda -(v1: T).(\lambda (H: (csub3 g (CHead e1 (Bind b1) v1) c2)).(let H0 \def -(match H in csub3 return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csub3 -? c c0)).((eq C c (CHead e1 (Bind b1) v1)) \to ((eq C c0 c2) \to (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind -b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 -e2)))))))))) with [(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) -(CHead e1 (Bind b1) v1))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def -(eq_ind C (CSort n) (\lambda (e: C).(match e in C return (\lambda (_: -C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow -False])) I (CHead e1 (Bind b1) v1) H0) in (False_ind ((eq C (CSort n) c2) \to -(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 -(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csub3 g e1 e2)))))) H2)) H1))) | (csub3_head c1 c0 H0 k u) \Rightarrow -(\lambda (H1: (eq C (CHead c1 k u) (CHead e1 (Bind b1) v1))).(\lambda (H2: -(eq C (CHead c0 k u) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e -in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) -\Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in ((let H4 \def -(f_equal C K (\lambda (e: C).(match e in C return (\lambda (_: C).K) with -[(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k u) -(CHead e1 (Bind b1) v1) H1) in ((let H5 \def (f_equal C C (\lambda (e: -C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | -(CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in -(eq_ind C e1 (\lambda (c: C).((eq K k (Bind b1)) \to ((eq T u v1) \to ((eq C -(CHead c0 k u) c2) \to ((csub3 g c c0) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))))) -(\lambda (H6: (eq K k (Bind b1))).(eq_ind K (Bind b1) (\lambda (k0: K).((eq T -u v1) \to ((eq C (CHead c0 k0 u) c2) \to ((csub3 g e1 c0) \to (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind -b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 -e2))))))))) (\lambda (H7: (eq T u v1)).(eq_ind T v1 (\lambda (t: T).((eq C -(CHead c0 (Bind b1) t) c2) \to ((csub3 g e1 c0) \to (ex2_3 B C T (\lambda -(b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) -v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 -e2)))))))) (\lambda (H8: (eq C (CHead c0 (Bind b1) v1) c2)).(eq_ind C (CHead -c0 (Bind b1) v1) (\lambda (c: C).((csub3 g e1 c0) \to (ex2_3 B C T (\lambda -(b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))) -(\lambda (H9: (csub3 g e1 c0)).(let H10 \def (eq_ind_r C c2 (\lambda (c: -C).(csub3 g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind b1) v1) H8) in -(ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c0 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda -(e2: C).(\lambda (_: T).(csub3 g e1 e2)))) b1 c0 v1 (refl_equal C (CHead c0 -(Bind b1) v1)) H9))) c2 H8)) u (sym_eq T u v1 H7))) k (sym_eq K k (Bind b1) -H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 -u1 u2) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead e1 -(Bind b1) v1))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def -(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with -[(CSort _) \Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind -Void) u1) (CHead e1 (Bind b1) v1) H2) in ((let H5 \def (f_equal C B (\lambda -(e: C).(match e in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow -Void | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).B) with -[(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Void])])) (CHead c1 (Bind -Void) u1) (CHead e1 (Bind b1) v1) H2) in ((let H6 \def (f_equal C C (\lambda -(e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 -| (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind -b1) v1) H2) in (eq_ind C e1 (\lambda (c: C).((eq B Void b1) \to ((eq T u1 v1) -\to ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c c0) \to ((not (eq B b -Void)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csub3 g e1 e2))))))))))) (\lambda (H7: (eq B Void -b1)).(eq_ind B Void (\lambda (_: B).((eq T u1 v1) \to ((eq C (CHead c0 (Bind -b) u2) c2) \to ((csub3 g e1 c0) \to ((not (eq B b Void)) \to (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind -b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 -e2)))))))))) (\lambda (H8: (eq T u1 v1)).(eq_ind T v1 (\lambda (_: T).((eq C -(CHead c0 (Bind b) u2) c2) \to ((csub3 g e1 c0) \to ((not (eq B b Void)) \to -(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 -(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csub3 g e1 e2))))))))) (\lambda (H9: (eq C (CHead c0 (Bind b) u2) -c2)).(eq_ind C (CHead c0 (Bind b) u2) (\lambda (c: C).((csub3 g e1 c0) \to -((not (eq B b Void)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: -C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))) (\lambda (H10: -(csub3 g e1 c0)).(\lambda (_: (not (eq B b Void))).(let H12 \def (eq_ind_r C -c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind b) -u2) H9) in (let H13 \def (eq_ind_r B b1 (\lambda (b0: B).(csub3 g (CHead e1 -(Bind b0) v1) (CHead c0 (Bind b) u2))) H12 Void H7) in (ex2_3_intro B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind b) -u2) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csub3 g e1 e2)))) b c0 u2 (refl_equal C (CHead c0 (Bind b) u2)) H10))))) -c2 H9)) u1 (sym_eq T u1 v1 H8))) b1 H7)) c1 (sym_eq C c1 e1 H6))) H5)) H4)) -H3 H0 H1))) | (csub3_abst c1 c0 H0 u t H1) \Rightarrow (\lambda (H2: (eq C -(CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1))).(\lambda (H3: (eq C (CHead -c0 (Bind Abbr) u) c2)).((let H4 \def (f_equal C T (\lambda (e: C).(match e in -C return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t0) -\Rightarrow t0])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H2) in -((let H5 \def (f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: -C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k -in K return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) -\Rightarrow Abst])])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H2) in -((let H6 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: -C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead -c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H2) in (eq_ind C e1 (\lambda (c: -C).((eq B Abst b1) \to ((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) -\to ((csub3 g c c0) \to ((ty3 g c0 u t) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))))))) -(\lambda (H7: (eq B Abst b1)).(eq_ind B Abst (\lambda (_: B).((eq T t v1) \to -((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g e1 c0) \to ((ty3 g c0 u t) -\to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 -(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csub3 g e1 e2)))))))))) (\lambda (H8: (eq T t v1)).(eq_ind T v1 (\lambda -(t0: T).((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g e1 c0) \to ((ty3 g -c0 u t0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csub3 g e1 e2))))))))) (\lambda (H9: (eq C (CHead c0 -(Bind Abbr) u) c2)).(eq_ind C (CHead c0 (Bind Abbr) u) (\lambda (c: -C).((csub3 g e1 c0) \to ((ty3 g c0 u v1) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))) -(\lambda (H10: (csub3 g e1 c0)).(\lambda (_: (ty3 g c0 u v1)).(let H12 \def -(eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind b1) v1) c)) H (CHead -c0 (Bind Abbr) u) H9) in (let H13 \def (eq_ind_r B b1 (\lambda (b: B).(csub3 -g (CHead e1 (Bind b) v1) (CHead c0 (Bind Abbr) u))) H12 Abst H7) in -(ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c0 (Bind Abbr) u) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda -(e2: C).(\lambda (_: T).(csub3 g e1 e2)))) Abbr c0 u (refl_equal C (CHead c0 -(Bind Abbr) u)) H10))))) c2 H9)) t (sym_eq T t v1 H8))) b1 H7)) c1 (sym_eq C -c1 e1 H6))) H5)) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CHead e1 (Bind b1) -v1)) (refl_equal C c2)))))))). - diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/arity.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/arity.ma index acd564afb..fe9436497 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/arity.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/arity.ma @@ -103,10 +103,83 @@ g c2 t0 a1))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c2: C).(\lambda (H3: (csuba g c c2)).(arity_repl g c2 t0 a1 (H1 c2 H3) a2 H2)))))))))) c1 t a H))))). -axiom csuba_arity_rev: +theorem csuba_arity_rev: \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 t a) \to (\forall (c2: C).((csuba g c2 c1) \to (arity g c2 t a))))))) -. +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: +A).(\forall (c2: C).((csuba g c2 c) \to (arity g c2 t0 a0)))))) (\lambda (c: +C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: (csuba g c2 +c)).(arity_sort g c2 n))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) +u))).(\lambda (a0: A).(\lambda (H1: (arity g d u a0)).(\lambda (H2: ((\forall +(c2: C).((csuba g c2 d) \to (arity g c2 u a0))))).(\lambda (c2: C).(\lambda +(H3: (csuba g c2 c)).(let H4 \def (csuba_getl_abbr_rev g c d u i H0 c2 H3) in +(or_ind (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d2 d))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 (asucc g a1))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u a1))))) (arity g c2 +(TLRef i) a0) (\lambda (H5: (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d)))).(ex2_ind C (\lambda (d2: +C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d)) +(arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H6: (getl i c2 (CHead x +(Bind Abbr) u))).(\lambda (H7: (csuba g x d)).(arity_abbr g c2 x u i H6 a0 +(H2 x H7))))) H5)) (\lambda (H5: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 (asucc g a1))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u a1)))))).(ex4_3_ind C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 +(asucc g a1))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d +u a1)))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(x2: A).(\lambda (H6: (getl i c2 (CHead x0 (Bind Abst) x1))).(\lambda (_: +(csuba g x0 d)).(\lambda (H8: (arity g x0 x1 (asucc g x2))).(\lambda (H9: +(arity g d u x2)).(arity_repl g c2 (TLRef i) x2 (arity_abst g c2 x0 x1 i H6 +x2 H8) a0 (arity_mono g d u x2 H9 a0 H1))))))))) H5)) H4)))))))))))) (\lambda +(c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl +i c (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u +(asucc g a0))).(\lambda (H2: ((\forall (c2: C).((csuba g c2 d) \to (arity g +c2 u (asucc g a0)))))).(\lambda (c2: C).(\lambda (H3: (csuba g c2 c)).(let H4 +\def (csuba_getl_abst_rev g c d u i H0 c2 H3) in (ex2_ind C (\lambda (d2: +C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d)) +(arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H5: (getl i c2 (CHead x +(Bind Abst) u))).(\lambda (H6: (csuba g x d)).(arity_abst g c2 x u i H5 a0 +(H2 x H6))))) H4)))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b +Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity +g c u a1)).(\lambda (H2: ((\forall (c2: C).((csuba g c2 c) \to (arity g c2 u +a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c +(Bind b) u) t0 a2)).(\lambda (H4: ((\forall (c2: C).((csuba g c2 (CHead c +(Bind b) u)) \to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H5: (csuba +g c2 c)).(arity_bind g b H0 c2 u a1 (H2 c2 H5) t0 a2 (H4 (CHead c2 (Bind b) +u) (csuba_head g c2 c H5 (Bind b) u)))))))))))))))) (\lambda (c: C).(\lambda +(u: T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda +(H1: ((\forall (c2: C).((csuba g c2 c) \to (arity g c2 u (asucc g +a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c +(Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (c2: C).((csuba g c2 (CHead c +(Bind Abst) u)) \to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H4: +(csuba g c2 c)).(arity_head g c2 u a1 (H1 c2 H4) t0 a2 (H3 (CHead c2 (Bind +Abst) u) (csuba_head g c2 c H4 (Bind Abst) u)))))))))))))) (\lambda (c: +C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda +(H1: ((\forall (c2: C).((csuba g c2 c) \to (arity g c2 u a1))))).(\lambda +(t0: T).(\lambda (a2: A).(\lambda (_: (arity g c t0 (AHead a1 a2))).(\lambda +(H3: ((\forall (c2: C).((csuba g c2 c) \to (arity g c2 t0 (AHead a1 +a2)))))).(\lambda (c2: C).(\lambda (H4: (csuba g c2 c)).(arity_appl g c2 u a1 +(H1 c2 H4) t0 a2 (H3 c2 H4))))))))))))) (\lambda (c: C).(\lambda (u: +T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda (H1: +((\forall (c2: C).((csuba g c2 c) \to (arity g c2 u (asucc g +a0)))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda (H3: +((\forall (c2: C).((csuba g c2 c) \to (arity g c2 t0 a0))))).(\lambda (c2: +C).(\lambda (H4: (csuba g c2 c)).(arity_cast g c2 u a0 (H1 c2 H4) t0 (H3 c2 +H4)))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: +(arity g c t0 a1)).(\lambda (H1: ((\forall (c2: C).((csuba g c2 c) \to (arity +g c2 t0 a1))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c2: +C).(\lambda (H3: (csuba g c2 c)).(arity_repl g c2 t0 a1 (H1 c2 H3) a2 +H2)))))))))) c1 t a H))))). theorem arity_appls_appl: \forall (g: G).(\forall (c: C).(\forall (v: T).(\forall (a1: A).((arity g c diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/clear.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/clear.ma index a7eb560d7..f5a06a36f 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/clear.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/clear.ma @@ -61,3 +61,44 @@ e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g (CHead c3 (Bind Abst) t) e2)) u) (csuba_abst g c3 c4 H0 t a H2 u H3) (clear_bind Abbr c4 u)) e1 (clear_gen_bind Abst c3 e1 t H4))))))))))))) c1 c2 H)))). +theorem csuba_clear_trans: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csuba g c2 c1) \to +(\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) +(\lambda (e2: C).(clear c2 e2)))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csuba g c2 +c1)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear +c0 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear c +e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) +e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csuba g e2 e1)) +(\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: +C).(\lambda (H0: (csuba g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c4 +e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear c3 +e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: +(clear (CHead c4 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c4 k0 u) +e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear +(CHead c3 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c4 (Bind +b) u) e1)).(eq_ind_r C (CHead c4 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csuba g e2 c)) (\lambda (e2: C).(clear (CHead c3 (Bind b) u) e2)))) +(ex_intro2 C (\lambda (e2: C).(csuba g e2 (CHead c4 (Bind b) u))) (\lambda +(e2: C).(clear (CHead c3 (Bind b) u) e2)) (CHead c3 (Bind b) u) (csuba_head g +c3 c4 H0 (Bind b) u) (clear_bind b c3 u)) e1 (clear_gen_bind b c4 e1 u H3)))) +(\lambda (f: F).(\lambda (H3: (clear (CHead c4 (Flat f) u) e1)).(let H4 \def +(H1 e1 (clear_gen_flat f c4 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g +e2 e1)) (\lambda (e2: C).(clear c3 e2)) (ex2 C (\lambda (e2: C).(csuba g e2 +e1)) (\lambda (e2: C).(clear (CHead c3 (Flat f) u) e2))) (\lambda (x: +C).(\lambda (H5: (csuba g x e1)).(\lambda (H6: (clear c3 x)).(ex_intro2 C +(\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear (CHead c3 (Flat f) +u) e2)) x H5 (clear_flat c3 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: +C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: ((\forall +(e1: C).((clear c4 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda +(e2: C).(clear c3 e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (H2: +(arity g c3 t (asucc g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u +a)).(\lambda (e1: C).(\lambda (H4: (clear (CHead c4 (Bind Abbr) u) +e1)).(eq_ind_r C (CHead c4 (Bind Abbr) u) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csuba g e2 c)) (\lambda (e2: C).(clear (CHead c3 (Bind Abst) t) +e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g e2 (CHead c4 (Bind Abbr) u))) +(\lambda (e2: C).(clear (CHead c3 (Bind Abst) t) e2)) (CHead c3 (Bind Abst) +t) (csuba_abst g c3 c4 H0 t a H2 u H3) (clear_bind Abst c3 t)) e1 +(clear_gen_bind Abbr c4 e1 u H4))))))))))))) c2 c1 H)))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/defs.ma index d108b9bba..857c2ab89 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/defs.ma @@ -18,7 +18,7 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/defs". include "arity/defs.ma". -inductive csuba (g:G): C \to (C \to Prop) \def +inductive csuba (g: G): C \to (C \to Prop) \def | csuba_sort: \forall (n: nat).(csuba g (CSort n) (CSort n)) | csuba_head: \forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to (\forall (k: K).(\forall (u: T).(csuba g (CHead c1 k u) (CHead c2 k u)))))) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/drop.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/drop.ma index ac8e3fae8..e145c6e11 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/drop.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/drop.ma @@ -813,3 +813,796 @@ A).(arity g d2 u2 a)))) x2 x3 x4 (drop_drop (Flat f) n x0 (CHead x2 (Bind Abbr) x3) H10 x1) H11 H12 H13))))))))) H9)) H8)) c2 H6))))) H5)))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abst) u1) t n H1)))))))))))) c1)))) i). +theorem csuba_drop_abst_rev: + \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop i +O c1 (CHead d1 (Bind Abst) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g +c2 c1) \to (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1)))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: +C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abst) u)) \to (\forall (g: +G).(\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda (d2: C).(drop n O c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))))))))) +(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda (H: (drop O O c1 +(CHead d1 (Bind Abst) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: +(csuba g c2 c1)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c2 c)) H0 +(CHead d1 (Bind Abst) u) (drop_gen_refl c1 (CHead d1 (Bind Abst) u) H)) in +(let H_x \def (csuba_gen_abst_rev g d1 c2 u H1) in (let H2 \def H_x in +(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x: C).(\lambda (H3: +(eq C c2 (CHead x (Bind Abst) u))).(\lambda (H4: (csuba g x d1)).(eq_ind_r C +(CHead x (Bind Abst) u) (\lambda (c: C).(ex2 C (\lambda (d2: C).(drop O O c +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))) (ex_intro2 C +(\lambda (d2: C).(drop O O (CHead x (Bind Abst) u) (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1)) x (drop_refl (CHead x (Bind Abst) u)) H4) +c2 H3)))) H2))))))))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: +C).(\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abst) u)) +\to (\forall (g: G).(\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda +(d2: C).(drop n O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1)))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: +C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abst) u)) \to (\forall +(g: G).(\forall (c2: C).((csuba g c2 c) \to (ex2 C (\lambda (d2: C).(drop (S +n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))))))) +(\lambda (n0: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop (S n) +O (CSort n0) (CHead d1 (Bind Abst) u))).(\lambda (g: G).(\lambda (c2: +C).(\lambda (_: (csuba g c2 (CSort n0))).(and3_ind (eq C (CHead d1 (Bind +Abst) u) (CSort n0)) (eq nat (S n) O) (eq nat O O) (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))) (\lambda (H2: (eq C (CHead d1 (Bind Abst) u) (CSort n0))).(\lambda (_: +(eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (match H2 in eq +return (\lambda (c: C).(\lambda (_: (eq ? ? c)).((eq C c (CSort n0)) \to (ex2 +C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)))))) with [refl_equal \Rightarrow (\lambda (H5: (eq C +(CHead d1 (Bind Abst) u) (CSort n0))).(let H6 \def (eq_ind C (CHead d1 (Bind +Abst) u) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with +[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n0) +H5) in (False_ind (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) H6)))]) in (H5 (refl_equal C +(CSort n0))))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind Abst) u) +H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).(\forall (u: +T).((drop (S n) O c (CHead d1 (Bind Abst) u)) \to (\forall (g: G).(\forall +(c2: C).((csuba g c2 c) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead +d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))))))))).(\lambda (k: +K).(\lambda (t: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n) +O (CHead c k t) (CHead d1 (Bind Abst) u))).(\lambda (g: G).(\lambda (c2: +C).(\lambda (H2: (csuba g c2 (CHead c k t))).(K_ind (\lambda (k0: K).((csuba +g c2 (CHead c k0 t)) \to ((drop (r k0 n) O c (CHead d1 (Bind Abst) u)) \to +(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda +(d2: C).(csuba g d2 d1)))))) (\lambda (b: B).(\lambda (H3: (csuba g c2 (CHead +c (Bind b) t))).(\lambda (H4: (drop (r (Bind b) n) O c (CHead d1 (Bind Abst) +u))).(B_ind (\lambda (b0: B).((csuba g c2 (CHead c (Bind b0) t)) \to ((drop +(r (Bind b0) n) O c (CHead d1 (Bind Abst) u)) \to (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1)))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Abbr) t))).(\lambda (H6: +(drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abst) u))).(let H_x \def +(csuba_gen_abbr_rev g c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C +(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba +g d2 c))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq +C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g c t a))))) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (H8: (ex2 C +(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba +g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) +(\lambda (d2: C).(csuba g d2 c)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x: +C).(\lambda (H9: (eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H10: (csuba g x +c)).(eq_ind_r C (CHead x (Bind Abbr) t) (\lambda (c0: C).(ex2 C (\lambda (d2: +C).(drop (S n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1)))) (let H11 \def (H c d1 u H6 g x H10) in (ex2_ind C (\lambda (d2: +C).(drop n O x (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) +(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x0: C).(\lambda (H12: +(drop n O x (CHead x0 (Bind Abst) u))).(\lambda (H13: (csuba g x0 d1)).(let +H14 \def (refl_equal nat (r (Bind Abst) n)) in (let H15 \def (eq_ind nat n +(\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abst) u))) H12 (r (Bind Abst) +n) H14) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) +t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop +(Bind Abbr) n x (CHead x0 (Bind Abst) u) H15 t) H13)))))) H11)) c2 H9)))) +H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g c t a)))))).(ex4_3_ind C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))) (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: +A).(\lambda (H9: (eq C c2 (CHead x0 (Bind Abst) x1))).(\lambda (H10: (csuba g +x0 c)).(\lambda (_: (arity g x0 x1 (asucc g x2))).(\lambda (_: (arity g c t +x2)).(eq_ind_r C (CHead x0 (Bind Abst) x1) (\lambda (c0: C).(ex2 C (\lambda +(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g +d2 d1)))) (let H13 \def (H c d1 u H6 g x0 H10) in (ex2_ind C (\lambda (d2: +C).(drop n O x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) +(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x: C).(\lambda +(H14: (drop n O x0 (CHead x (Bind Abst) u))).(\lambda (H15: (csuba g x +d1)).(let H16 \def (refl_equal nat (r (Bind Abst) n)) in (let H17 \def +(eq_ind nat n (\lambda (n0: nat).(drop n0 O x0 (CHead x (Bind Abst) u))) H14 +(r (Bind Abst) n) H16) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead +x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1)) x (drop_drop (Bind Abst) n x0 (CHead x (Bind Abst) u) H17 x1) H15)))))) +H13)) c2 H9)))))))) H8)) H7))))) (\lambda (H5: (csuba g c2 (CHead c (Bind +Abst) t))).(\lambda (H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abst) +u))).(let H_x \def (csuba_gen_abst_rev g c c2 t H5) in (let H7 \def H_x in +(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: +C).(csuba g d2 c)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x: C).(\lambda (H8: +(eq C c2 (CHead x (Bind Abst) t))).(\lambda (H9: (csuba g x c)).(eq_ind_r C +(CHead x (Bind Abst) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) +O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))) (let H10 +\def (H c d1 u H6 g x H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead +d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u))) (\lambda +(d2: C).(csuba g d2 d1))) (\lambda (x0: C).(\lambda (H11: (drop n O x (CHead +x0 (Bind Abst) u))).(\lambda (H12: (csuba g x0 d1)).(let H13 \def (refl_equal +nat (r (Bind Abst) n)) in (let H14 \def (eq_ind nat n (\lambda (n0: +nat).(drop n0 O x (CHead x0 (Bind Abst) u))) H11 (r (Bind Abst) n) H13) in +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop (Bind Abst) +n x (CHead x0 (Bind Abst) u) H14 t) H12)))))) H10)) c2 H8)))) H7))))) +(\lambda (H5: (csuba g c2 (CHead c (Bind Void) t))).(\lambda (H6: (drop (r +(Bind Void) n) O c (CHead d1 (Bind Abst) u))).(let H_x \def +(csuba_gen_void_rev g c c2 t H5) in (let H7 \def H_x in (ex2_ind C (\lambda +(d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: C).(csuba g d2 c)) +(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda +(d2: C).(csuba g d2 d1))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x +(Bind Void) t))).(\lambda (H9: (csuba g x c)).(eq_ind_r C (CHead x (Bind +Void) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))) (let H10 \def (H c d1 u +H6 g x H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(drop (S n) O +(CHead x (Bind Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g +d2 d1))) (\lambda (x0: C).(\lambda (H11: (drop n O x (CHead x0 (Bind Abst) +u))).(\lambda (H12: (csuba g x0 d1)).(let H13 \def (refl_equal nat (r (Bind +Abst) n)) in (let H14 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x +(CHead x0 (Bind Abst) u))) H11 (r (Bind Abst) n) H13) in (ex_intro2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop (Bind Void) n x (CHead +x0 (Bind Abst) u) H14 t) H12)))))) H10)) c2 H8)))) H7))))) b H3 H4)))) +(\lambda (f: F).(\lambda (H3: (csuba g c2 (CHead c (Flat f) t))).(\lambda +(H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abst) u))).(let H_x \def +(csuba_gen_flat_rev g c c2 t f H3) in (let H5 \def H_x in (ex2_2_ind C T +(\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 c))) (ex2 C (\lambda (d2: C).(drop (S n) +O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda +(x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) +x1))).(\lambda (H7: (csuba g x0 c)).(eq_ind_r C (CHead x0 (Flat f) x1) +(\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))) (let H8 \def (H0 d1 u H4 g x0 +H7) in (ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(drop (S n) O +(CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g +d2 d1))) (\lambda (x: C).(\lambda (H9: (drop (S n) O x0 (CHead x (Bind Abst) +u))).(\lambda (H10: (csuba g x d1)).(ex_intro2 C (\lambda (d2: C).(drop (S n) +O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g +d2 d1)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abst) u) H9 x1) H10)))) +H8)) c2 H6))))) H5)))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abst) u) t n +H1)))))))))))) c1)))) i). + +theorem csuba_drop_abbr_rev: + \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop i +O c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba +g c2 c1) \to (or (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +a))))))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: +C).(\forall (u1: T).((drop n O c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (g: +G).(\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(drop n +O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: +T).(\lambda (H: (drop O O c1 (CHead d1 (Bind Abbr) u1))).(\lambda (g: +G).(\lambda (c2: C).(\lambda (H0: (csuba g c2 c1)).(let H1 \def (eq_ind C c1 +(\lambda (c: C).(csuba g c2 c)) H0 (CHead d1 (Bind Abbr) u1) (drop_gen_refl +c1 (CHead d1 (Bind Abbr) u1) H)) in (let H_x \def (csuba_gen_abbr_rev g d1 c2 +u1 H1) in (let H2 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H3: +(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: +C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O +O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x +(Bind Abbr) u1))).(\lambda (H5: (csuba g x d1)).(eq_ind_r C (CHead x (Bind +Abbr) u1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +a))))))) (or_introl (ex2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abbr) +u1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x (Bind +Abbr) u1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: +C).(drop O O (CHead x (Bind Abbr) u1) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1)) x (drop_refl (CHead x (Bind Abbr) u1)) H5)) c2 +H4)))) H3)) (\lambda (H3: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H4: (eq C c2 (CHead x0 (Bind +Abst) x1))).(\lambda (H5: (csuba g x0 d1)).(\lambda (H6: (arity g x0 x1 +(asucc g x2))).(\lambda (H7: (arity g d1 u1 x2)).(eq_ind_r C (CHead x0 (Bind +Abst) x1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +a))))))) (or_intror (ex2 C (\lambda (d2: C).(drop O O (CHead x0 (Bind Abst) +x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind +Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abst) x1) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_refl (CHead x0 (Bind Abst) x1)) H5 +H6 H7)) c2 H4)))))))) H3)) H2))))))))))) (\lambda (n: nat).(\lambda (H: +((\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop n O c1 (CHead d1 +(Bind Abbr) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c2 c1) \to +(or (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop n O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +a))))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: +C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abbr) u1)) \to (\forall +(g: G).(\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda (d2: C).(drop +(S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))))))))))) (\lambda (n0: nat).(\lambda (d1: +C).(\lambda (u1: T).(\lambda (H0: (drop (S n) O (CSort n0) (CHead d1 (Bind +Abbr) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (csuba g c2 (CSort +n0))).(and3_ind (eq C (CHead d1 (Bind Abbr) u1) (CSort n0)) (eq nat (S n) O) +(eq nat O O) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (H2: (eq C (CHead d1 (Bind Abbr) u1) (CSort n0))).(\lambda (_: (eq +nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (match H2 in eq return +(\lambda (c: C).(\lambda (_: (eq ? ? c)).((eq C c (CSort n0)) \to (or (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))) with +[refl_equal \Rightarrow (\lambda (H5: (eq C (CHead d1 (Bind Abbr) u1) (CSort +n0))).(let H6 \def (eq_ind C (CHead d1 (Bind Abbr) u1) (\lambda (e: C).(match +e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | +(CHead _ _ _) \Rightarrow True])) I (CSort n0) H5) in (False_ind (or (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) H6)))]) in (H5 +(refl_equal C (CSort n0))))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind +Abbr) u1) H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: +C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abbr) u1)) \to (\forall +(g: G).(\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda (d2: C).(drop +(S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))))))))))).(\lambda (k: K).(\lambda (t: +T).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H1: (drop (S n) O (CHead c k +t) (CHead d1 (Bind Abbr) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: +(csuba g c2 (CHead c k t))).(K_ind (\lambda (k0: K).((csuba g c2 (CHead c k0 +t)) \to ((drop (r k0 n) O c (CHead d1 (Bind Abbr) u1)) \to (or (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))) (\lambda (b: +B).(\lambda (H3: (csuba g c2 (CHead c (Bind b) t))).(\lambda (H4: (drop (r +(Bind b) n) O c (CHead d1 (Bind Abbr) u1))).(B_ind (\lambda (b0: B).((csuba g +c2 (CHead c (Bind b0) t)) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind +Abbr) u1)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +a))))))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Abbr) t))).(\lambda (H6: +(drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def +(csuba_gen_abbr_rev g c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C +(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba +g d2 c))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq +C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g c t a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind +Abbr) t))) (\lambda (d2: C).(csuba g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq +C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x: +C).(\lambda (H9: (eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H10: (csuba g x +c)).(eq_ind_r C (CHead x (Bind Abbr) t) (\lambda (c0: C).(or (ex2 C (\lambda +(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))))) (let H11 \def (H c d1 u1 H6 g +x H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or +(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n +O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind +C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind +Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: +C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abbr) u1))).(\lambda (H14: +(csuba g x0 d1)).(let H15 \def (refl_equal nat (r (Bind Abst) n)) in (let H16 +\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abbr) +u1))) H13 (r (Bind Abst) n) H15) in (or_introl (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop (Bind Abbr) +n x (CHead x0 (Bind Abbr) u1) H16 t) H14))))))) H12)) (\lambda (H12: (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H13: (drop n O x +(CHead x0 (Bind Abst) x1))).(\lambda (H14: (csuba g x0 d1)).(\lambda (H15: +(arity g x0 x1 (asucc g x2))).(\lambda (H16: (arity g d1 u1 x2)).(let H17 +\def (refl_equal nat (r (Bind Abst) n)) in (let H18 \def (eq_ind nat n +(\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abst) x1))) H13 (r (Bind +Abst) n) H17) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x +(Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_drop (Bind Abbr) n +x (CHead x0 (Bind Abst) x1) H18 t) H14 H15 H16))))))))))) H12)) H11)) c2 +H9)))) H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))))).(ex4_3_ind C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc +g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))) +(or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 +(CHead x0 (Bind Abst) x1))).(\lambda (H10: (csuba g x0 c)).(\lambda (_: +(arity g x0 x1 (asucc g x2))).(\lambda (_: (arity g c t x2)).(eq_ind_r C +(CHead x0 (Bind Abst) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop +(S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))))) (let H13 \def (H c d1 u1 H6 g x0 H10) in +(or_ind (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (H14: (ex2 C (\lambda (d2: C).(drop n +O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind +C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind +Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x: +C).(\lambda (H15: (drop n O x0 (CHead x (Bind Abbr) u1))).(\lambda (H16: +(csuba g x d1)).(let H17 \def (refl_equal nat (r (Bind Abst) n)) in (let H18 +\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x0 (CHead x (Bind Abbr) +u1))) H15 (r (Bind Abst) n) H17) in (or_introl (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop (Bind +Abst) n x0 (CHead x (Bind Abbr) u1) H18 x1) H16))))))) H14)) (\lambda (H14: +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: +A).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Abst) x4))).(\lambda (H16: +(csuba g x3 d1)).(\lambda (H17: (arity g x3 x4 (asucc g x5))).(\lambda (H18: +(arity g d1 u1 x5)).(let H19 \def (refl_equal nat (r (Bind Abst) n)) in (let +H20 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x0 (CHead x3 (Bind Abst) +x4))) H15 (r (Bind Abst) n) H19) in (or_intror (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x3 x4 x5 +(drop_drop (Bind Abst) n x0 (CHead x3 (Bind Abst) x4) H20 x1) H16 H17 +H18))))))))))) H14)) H13)) c2 H9)))))))) H8)) H7))))) (\lambda (H5: (csuba g +c2 (CHead c (Bind Abst) t))).(\lambda (H6: (drop (r (Bind Abst) n) O c (CHead +d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_abst_rev g c c2 t H5) in (let +H7 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) +t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C (\lambda (d2: C).(drop (S n) +O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead +d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x +(Bind Abst) t))).(\lambda (H9: (csuba g x c)).(eq_ind_r C (CHead x (Bind +Abst) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind (ex2 C (\lambda +(d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n +O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead +x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H11: +(ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) +u1))).(\lambda (H13: (csuba g x0 d1)).(let H14 \def (refl_equal nat (r (Bind +Abst) n)) in (let H15 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x +(CHead x0 (Bind Abbr) u1))) H12 (r (Bind Abst) n) H14) in (or_introl (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O +(CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g +d2 d1)) x0 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abbr) u1) H15 t) +H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) +x1))).(\lambda (H13: (csuba g x0 d1)).(\lambda (H14: (arity g x0 x1 (asucc g +x2))).(\lambda (H15: (arity g d1 u1 x2)).(let H16 \def (refl_equal nat (r +(Bind Abst) n)) in (let H17 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O +x (CHead x0 (Bind Abst) x1))) H12 (r (Bind Abst) n) H16) in (or_intror (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))) x0 x1 x2 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abst) x1) H17 t) +H13 H14 H15))))))))))) H11)) H10)) c2 H8)))) H7))))) (\lambda (H5: (csuba g +c2 (CHead c (Bind Void) t))).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead +d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_void_rev g c c2 t H5) in (let +H7 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) +t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C (\lambda (d2: C).(drop (S n) +O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead +d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x +(Bind Void) t))).(\lambda (H9: (csuba g x c)).(eq_ind_r C (CHead x (Bind +Void) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind (ex2 C (\lambda +(d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n +O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead +x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H11: +(ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) +u1))).(\lambda (H13: (csuba g x0 d1)).(let H14 \def (refl_equal nat (r (Bind +Abst) n)) in (let H15 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x +(CHead x0 (Bind Abbr) u1))) H12 (r (Bind Abst) n) H14) in (or_introl (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O +(CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g +d2 d1)) x0 (drop_drop (Bind Void) n x (CHead x0 (Bind Abbr) u1) H15 t) +H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Void) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) +x1))).(\lambda (H13: (csuba g x0 d1)).(\lambda (H14: (arity g x0 x1 (asucc g +x2))).(\lambda (H15: (arity g d1 u1 x2)).(let H16 \def (refl_equal nat (r +(Bind Abst) n)) in (let H17 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O +x (CHead x0 (Bind Abst) x1))) H12 (r (Bind Abst) n) H16) in (or_intror (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))) x0 x1 x2 (drop_drop (Bind Void) n x (CHead x0 (Bind Abst) x1) H17 t) +H13 H14 H15))))))))))) H11)) H10)) c2 H8)))) H7))))) b H3 H4)))) (\lambda (f: +F).(\lambda (H3: (csuba g c2 (CHead c (Flat f) t))).(\lambda (H4: (drop (r +(Flat f) n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_flat_rev +g c c2 t f H3) in (let H5 \def H_x in (ex2_2_ind C T (\lambda (d2: +C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 c))) (or (ex2 C (\lambda (d2: C).(drop (S n) O +c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead +d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: +(eq C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g x0 c)).(eq_ind_r C +(CHead x0 (Flat f) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S +n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 +C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))))) (let H8 \def (H0 d1 u1 H4 g x0 H7) in (or_ind +(ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (H9: (ex2 C (\lambda (d2: C).(drop (S +n) O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1)))).(ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S +n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x: C).(\lambda (H10: (drop (S n) O x0 (CHead x (Bind Abbr) +u1))).(\lambda (H11: (csuba g x d1)).(or_introl (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop (Flat f) n +x0 (CHead x (Bind Abbr) u1) H10 x1) H11))))) H9)) (\lambda (H9: (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: A).(\lambda (H10: (drop (S n) +O x0 (CHead x2 (Bind Abst) x3))).(\lambda (H11: (csuba g x2 d1)).(\lambda +(H12: (arity g x2 x3 (asucc g x4))).(\lambda (H13: (arity g d1 u1 +x4)).(or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Flat f) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))) x2 x3 x4 (drop_drop (Flat f) n x0 (CHead x2 (Bind +Abst) x3) H10 x1) H11 H12 H13))))))))) H9)) H8)) c2 H6))))) H5)))))) k H2 +(drop_gen_drop k c (CHead d1 (Bind Abbr) u1) t n H1)))))))))))) c1)))) i). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/fwd.ma index c5c65696a..1bb036cca 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/fwd.ma @@ -409,3 +409,435 @@ H14 Abst H8) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda H9))) b1 H8)) c1 (sym_eq C c1 e1 H7))) H6)) H5)) H4 H0 H1 H2)))]) in (H0 (refl_equal C (CHead e1 (Bind b1) v1)) (refl_equal C c2)))))))). +theorem csuba_gen_abst_rev: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g c +(CHead d1 (Bind Abst) u)) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: +(csuba g c (CHead d1 (Bind Abst) u))).(let H0 \def (match H in csuba return +(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 c1)).((eq C c0 c) +\to ((eq C c1 (CHead d1 (Bind Abst) u)) \to (ex2 C (\lambda (d2: C).(eq C c +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) with +[(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) c)).(\lambda (H1: +(eq C (CSort n) (CHead d1 (Bind Abst) u))).(eq_ind C (CSort n) (\lambda (c0: +C).((eq C (CSort n) (CHead d1 (Bind Abst) u)) \to (ex2 C (\lambda (d2: C).(eq +C c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))) (\lambda +(H2: (eq C (CSort n) (CHead d1 (Bind Abst) u))).(let H3 \def (eq_ind C (CSort +n) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) +\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abst) +u) H2) in (False_ind (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) H3))) c H0 H1))) | (csuba_head +c1 c2 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) c)).(\lambda +(H2: (eq C (CHead c2 k u0) (CHead d1 (Bind Abst) u))).(eq_ind C (CHead c1 k +u0) (\lambda (c0: C).((eq C (CHead c2 k u0) (CHead d1 (Bind Abst) u)) \to +((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(eq C c0 (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1)))))) (\lambda (H3: (eq C (CHead c2 k +u0) (CHead d1 (Bind Abst) u))).(let H4 \def (f_equal C T (\lambda (e: +C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | +(CHead _ _ t) \Rightarrow t])) (CHead c2 k u0) (CHead d1 (Bind Abst) u) H3) +in ((let H5 \def (f_equal C K (\lambda (e: C).(match e in C return (\lambda +(_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) +(CHead c2 k u0) (CHead d1 (Bind Abst) u) H3) in ((let H6 \def (f_equal C C +(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u0) (CHead d1 +(Bind Abst) u) H3) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Bind Abst)) \to +((eq T u0 u) \to ((csuba g c1 c0) \to (ex2 C (\lambda (d2: C).(eq C (CHead c1 +k u0) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))))) +(\lambda (H7: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) (\lambda (k0: +K).((eq T u0 u) \to ((csuba g c1 d1) \to (ex2 C (\lambda (d2: C).(eq C (CHead +c1 k0 u0) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))) +(\lambda (H8: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((csuba g c1 d1) \to +(ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))))) (\lambda (H9: (csuba g c1 +d1)).(ex_intro2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) u) (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 +(Bind Abst) u)) H9)) u0 (sym_eq T u0 u H8))) k (sym_eq K k (Bind Abst) H7))) +c2 (sym_eq C c2 d1 H6))) H5)) H4))) c H1 H2 H0))) | (csuba_abst c1 c2 H0 t a +H1 u0 H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) +c)).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u0) (CHead d1 (Bind Abst) +u))).(eq_ind C (CHead c1 (Bind Abst) t) (\lambda (c0: C).((eq C (CHead c2 +(Bind Abbr) u0) (CHead d1 (Bind Abst) u)) \to ((csuba g c1 c2) \to ((arity g +c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C (\lambda (d2: C).(eq C c0 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) (\lambda +(H5: (eq C (CHead c2 (Bind Abbr) u0) (CHead d1 (Bind Abst) u))).(let H6 \def +(eq_ind C (CHead c2 (Bind Abbr) u0) (\lambda (e: C).(match e in C return +(\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) +\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind b) +\Rightarrow (match b in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow +True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) +\Rightarrow False])])) I (CHead d1 (Bind Abst) u) H5) in (False_ind ((csuba g +c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C +(\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1)))))) H6))) c H3 H4 H0 H1 H2)))]) in (H0 +(refl_equal C c) (refl_equal C (CHead d1 (Bind Abst) u)))))))). + +theorem csuba_gen_void_rev: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g c +(CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind +Void) u))) (\lambda (d2: C).(csuba g d2 d1))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: +(csuba g c (CHead d1 (Bind Void) u))).(let H0 \def (match H in csuba return +(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 c1)).((eq C c0 c) +\to ((eq C c1 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c +(CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) with +[(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) c)).(\lambda (H1: +(eq C (CSort n) (CHead d1 (Bind Void) u))).(eq_ind C (CSort n) (\lambda (c0: +C).((eq C (CSort n) (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq +C c0 (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1))))) (\lambda +(H2: (eq C (CSort n) (CHead d1 (Bind Void) u))).(let H3 \def (eq_ind C (CSort +n) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) +\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Void) +u) H2) in (False_ind (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind +Void) u))) (\lambda (d2: C).(csuba g d2 d1))) H3))) c H0 H1))) | (csuba_head +c1 c2 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) c)).(\lambda +(H2: (eq C (CHead c2 k u0) (CHead d1 (Bind Void) u))).(eq_ind C (CHead c1 k +u0) (\lambda (c0: C).((eq C (CHead c2 k u0) (CHead d1 (Bind Void) u)) \to +((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(eq C c0 (CHead d2 (Bind Void) +u))) (\lambda (d2: C).(csuba g d2 d1)))))) (\lambda (H3: (eq C (CHead c2 k +u0) (CHead d1 (Bind Void) u))).(let H4 \def (f_equal C T (\lambda (e: +C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | +(CHead _ _ t) \Rightarrow t])) (CHead c2 k u0) (CHead d1 (Bind Void) u) H3) +in ((let H5 \def (f_equal C K (\lambda (e: C).(match e in C return (\lambda +(_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) +(CHead c2 k u0) (CHead d1 (Bind Void) u) H3) in ((let H6 \def (f_equal C C +(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u0) (CHead d1 +(Bind Void) u) H3) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Bind Void)) \to +((eq T u0 u) \to ((csuba g c1 c0) \to (ex2 C (\lambda (d2: C).(eq C (CHead c1 +k u0) (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1))))))) +(\lambda (H7: (eq K k (Bind Void))).(eq_ind K (Bind Void) (\lambda (k0: +K).((eq T u0 u) \to ((csuba g c1 d1) \to (ex2 C (\lambda (d2: C).(eq C (CHead +c1 k0 u0) (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))) +(\lambda (H8: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((csuba g c1 d1) \to +(ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Void) t) (CHead d2 (Bind Void) +u))) (\lambda (d2: C).(csuba g d2 d1))))) (\lambda (H9: (csuba g c1 +d1)).(ex_intro2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Void) u) (CHead d2 +(Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 +(Bind Void) u)) H9)) u0 (sym_eq T u0 u H8))) k (sym_eq K k (Bind Void) H7))) +c2 (sym_eq C c2 d1 H6))) H5)) H4))) c H1 H2 H0))) | (csuba_abst c1 c2 H0 t a +H1 u0 H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) +c)).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u0) (CHead d1 (Bind Void) +u))).(eq_ind C (CHead c1 (Bind Abst) t) (\lambda (c0: C).((eq C (CHead c2 +(Bind Abbr) u0) (CHead d1 (Bind Void) u)) \to ((csuba g c1 c2) \to ((arity g +c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C (\lambda (d2: C).(eq C c0 +(CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) (\lambda +(H5: (eq C (CHead c2 (Bind Abbr) u0) (CHead d1 (Bind Void) u))).(let H6 \def +(eq_ind C (CHead c2 (Bind Abbr) u0) (\lambda (e: C).(match e in C return +(\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) +\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind b) +\Rightarrow (match b in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow +True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) +\Rightarrow False])])) I (CHead d1 (Bind Void) u) H5) in (False_ind ((csuba g +c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C +(\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Void) u))) +(\lambda (d2: C).(csuba g d2 d1)))))) H6))) c H3 H4 H0 H1 H2)))]) in (H0 +(refl_equal C c) (refl_equal C (CHead d1 (Bind Void) u)))))))). + +theorem csuba_gen_abbr_rev: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g c +(CHead d1 (Bind Abbr) u1)) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +a)))))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda +(H: (csuba g c (CHead d1 (Bind Abbr) u1))).(let H0 \def (match H in csuba +return (\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 c1)).((eq C +c0 c) \to ((eq C c1 (CHead d1 (Bind Abbr) u1)) \to (or (ex2 C (\lambda (d2: +C).(eq C c (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead +d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))))))))) with [(csuba_sort n) \Rightarrow (\lambda +(H0: (eq C (CSort n) c)).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abbr) +u1))).(eq_ind C (CSort n) (\lambda (c0: C).((eq C (CSort n) (CHead d1 (Bind +Abbr) u1)) \to (or (ex2 C (\lambda (d2: C).(eq C c0 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C c0 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))))) +(\lambda (H2: (eq C (CSort n) (CHead d1 (Bind Abbr) u1))).(let H3 \def +(eq_ind C (CSort n) (\lambda (e: C).(match e in C return (\lambda (_: +C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow +False])) I (CHead d1 (Bind Abbr) u1) H2) in (False_ind (or (ex2 C (\lambda +(d2: C).(eq C (CSort n) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g +d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C +(CSort n) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) H3))) c H0 H1))) | (csuba_head +c1 c2 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) c)).(\lambda +(H2: (eq C (CHead c2 k u) (CHead d1 (Bind Abbr) u1))).(eq_ind C (CHead c1 k +u) (\lambda (c0: C).((eq C (CHead c2 k u) (CHead d1 (Bind Abbr) u1)) \to +((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(eq C c0 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C c0 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))) +(\lambda (H3: (eq C (CHead c2 k u) (CHead d1 (Bind Abbr) u1))).(let H4 \def +(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with +[(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c2 k u) +(CHead d1 (Bind Abbr) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: +C).(match e in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | +(CHead _ k0 _) \Rightarrow k0])) (CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) +in ((let H6 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda +(_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) +(CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) in (eq_ind C d1 (\lambda (c0: +C).((eq K k (Bind Abbr)) \to ((eq T u u1) \to ((csuba g c1 c0) \to (or (ex2 C +(\lambda (d2: C).(eq C (CHead c1 k u) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(eq C (CHead c1 k u) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))))))) +(\lambda (H7: (eq K k (Bind Abbr))).(eq_ind K (Bind Abbr) (\lambda (k0: +K).((eq T u u1) \to ((csuba g c1 d1) \to (or (ex2 C (\lambda (d2: C).(eq C +(CHead c1 k0 u) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C +(CHead c1 k0 u) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))))))) (\lambda (H8: (eq T u +u1)).(eq_ind T u1 (\lambda (t: T).((csuba g c1 d1) \to (or (ex2 C (\lambda +(d2: C).(eq C (CHead c1 (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(eq C (CHead c1 (Bind Abbr) t) (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +a)))))))) (\lambda (H9: (csuba g c1 d1)).(or_introl (ex2 C (\lambda (d2: +C).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C +(\lambda (d2: C).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 (Bind Abbr) u1)) +H9))) u (sym_eq T u u1 H8))) k (sym_eq K k (Bind Abbr) H7))) c2 (sym_eq C c2 +d1 H6))) H5)) H4))) c H1 H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u H2) +\Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) c)).(\lambda (H4: +(eq C (CHead c2 (Bind Abbr) u) (CHead d1 (Bind Abbr) u1))).(eq_ind C (CHead +c1 (Bind Abst) t) (\lambda (c0: C).((eq C (CHead c2 (Bind Abbr) u) (CHead d1 +(Bind Abbr) u1)) \to ((csuba g c1 c2) \to ((arity g c1 t (asucc g a)) \to +((arity g c2 u a) \to (or (ex2 C (\lambda (d2: C).(eq C c0 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C c0 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 (asucc g a0))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 a0))))))))))) +(\lambda (H5: (eq C (CHead c2 (Bind Abbr) u) (CHead d1 (Bind Abbr) u1))).(let +H6 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) +with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 +(Bind Abbr) u) (CHead d1 (Bind Abbr) u1) H5) in ((let H7 \def (f_equal C C +(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 (Bind Abbr) u) +(CHead d1 (Bind Abbr) u1) H5) in (eq_ind C d1 (\lambda (c0: C).((eq T u u1) +\to ((csuba g c1 c0) \to ((arity g c1 t (asucc g a)) \to ((arity g c0 u a) +\to (or (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: +A).(arity g d2 u2 (asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a0: A).(arity g d1 u1 a0))))))))))) (\lambda (H8: (eq T u u1)).(eq_ind T u1 +(\lambda (t0: T).((csuba g c1 d1) \to ((arity g c1 t (asucc g a)) \to ((arity +g d1 t0 a) \to (or (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) +t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: +A).(arity g d2 u2 (asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a0: A).(arity g d1 u1 a0)))))))))) (\lambda (H9: (csuba g c1 d1)).(\lambda +(H10: (arity g c1 t (asucc g a))).(\lambda (H11: (arity g d1 u1 +a)).(or_intror (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: +A).(arity g d2 u2 (asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a0: A).(arity g d1 u1 a0))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 (asucc g +a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 +a0)))) c1 t a (refl_equal C (CHead c1 (Bind Abst) t)) H9 H10 H11))))) u +(sym_eq T u u1 H8))) c2 (sym_eq C c2 d1 H7))) H6))) c H3 H4 H0 H1 H2)))]) in +(H0 (refl_equal C c) (refl_equal C (CHead d1 (Bind Abbr) u1)))))))). + +theorem csuba_gen_flat_rev: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).(\forall +(f: F).((csuba g c (CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1))))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda +(f: F).(\lambda (H: (csuba g c (CHead d1 (Flat f) u1))).(let H0 \def (match H +in csuba return (\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 +c1)).((eq C c0 c) \to ((eq C c1 (CHead d1 (Flat f) u1)) \to (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))))))))) with [(csuba_sort n) +\Rightarrow (\lambda (H0: (eq C (CSort n) c)).(\lambda (H1: (eq C (CSort n) +(CHead d1 (Flat f) u1))).(eq_ind C (CSort n) (\lambda (c0: C).((eq C (CSort +n) (CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(eq C c0 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba +g d2 d1)))))) (\lambda (H2: (eq C (CSort n) (CHead d1 (Flat f) u1))).(let H3 +\def (eq_ind C (CSort n) (\lambda (e: C).(match e in C return (\lambda (_: +C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow +False])) I (CHead d1 (Flat f) u1) H2) in (False_ind (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(eq C (CSort n) (CHead d2 (Flat f) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) H3))) c H0 H1))) | (csuba_head c1 c2 H0 +k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) c)).(\lambda (H2: (eq C +(CHead c2 k u) (CHead d1 (Flat f) u1))).(eq_ind C (CHead c1 k u) (\lambda +(c0: C).((eq C (CHead c2 k u) (CHead d1 (Flat f) u1)) \to ((csuba g c1 c2) +\to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c0 (CHead d2 (Flat f) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) (\lambda (H3: +(eq C (CHead c2 k u) (CHead d1 (Flat f) u1))).(let H4 \def (f_equal C T +(\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) +\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c2 k u) (CHead d1 (Flat +f) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e in C return +(\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow +k0])) (CHead c2 k u) (CHead d1 (Flat f) u1) H3) in ((let H6 \def (f_equal C C +(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u) (CHead d1 +(Flat f) u1) H3) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Flat f)) \to ((eq +T u u1) \to ((csuba g c1 c0) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(eq C (CHead c1 k u) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1)))))))) (\lambda (H7: (eq K k (Flat f))).(eq_ind K +(Flat f) (\lambda (k0: K).((eq T u u1) \to ((csuba g c1 d1) \to (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k0 u) (CHead d2 (Flat f) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) (\lambda (H8: +(eq T u u1)).(eq_ind T u1 (\lambda (t: T).((csuba g c1 d1) \to (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 (Flat f) t) (CHead d2 (Flat +f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (\lambda (H9: +(csuba g c1 d1)).(ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(eq C +(CHead c1 (Flat f) u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))) c1 u1 (refl_equal C (CHead c1 (Flat f) u1)) H9)) u +(sym_eq T u u1 H8))) k (sym_eq K k (Flat f) H7))) c2 (sym_eq C c2 d1 H6))) +H5)) H4))) c H1 H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u H2) \Rightarrow +(\lambda (H3: (eq C (CHead c1 (Bind Abst) t) c)).(\lambda (H4: (eq C (CHead +c2 (Bind Abbr) u) (CHead d1 (Flat f) u1))).(eq_ind C (CHead c1 (Bind Abst) t) +(\lambda (c0: C).((eq C (CHead c2 (Bind Abbr) u) (CHead d1 (Flat f) u1)) \to +((csuba g c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u a) \to +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c0 (CHead d2 (Flat f) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))) (\lambda (H5: +(eq C (CHead c2 (Bind Abbr) u) (CHead d1 (Flat f) u1))).(let H6 \def (eq_ind +C (CHead c2 (Bind Abbr) u) (\lambda (e: C).(match e in C return (\lambda (_: +C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match +k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat +_) \Rightarrow False])])) I (CHead d1 (Flat f) u1) H5) in (False_ind ((csuba +g c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u a) \to (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 (Bind Abst) t) (CHead d2 +(Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) H6))) +c H3 H4 H0 H1 H2)))]) in (H0 (refl_equal C c) (refl_equal C (CHead d1 (Flat +f) u1))))))))). + +theorem csuba_gen_bind_rev: + \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall +(v1: T).((csuba g c2 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))))) +\def + \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda +(v1: T).(\lambda (H: (csuba g c2 (CHead e1 (Bind b1) v1))).(let H0 \def +(match H in csuba return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csuba +? c c0)).((eq C c c2) \to ((eq C c0 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind +b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 +e1)))))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) +c2)).(\lambda (H1: (eq C (CSort n) (CHead e1 (Bind b1) v1))).(eq_ind C (CSort +n) (\lambda (c: C).((eq C (CSort n) (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind +b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 +e1))))))) (\lambda (H2: (eq C (CSort n) (CHead e1 (Bind b1) v1))).(let H3 +\def (eq_ind C (CSort n) (\lambda (e: C).(match e in C return (\lambda (_: +C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow +False])) I (CHead e1 (Bind b1) v1) H2) in (False_ind (ex2_3 B C T (\lambda +(b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CSort n) (CHead e2 (Bind b2) +v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))) +H3))) c2 H0 H1))) | (csuba_head c1 c0 H0 k u) \Rightarrow (\lambda (H1: (eq C +(CHead c1 k u) c2)).(\lambda (H2: (eq C (CHead c0 k u) (CHead e1 (Bind b1) +v1))).(eq_ind C (CHead c1 k u) (\lambda (c: C).((eq C (CHead c0 k u) (CHead +e1 (Bind b1) v1)) \to ((csuba g c1 c0) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))) +(\lambda (H3: (eq C (CHead c0 k u) (CHead e1 (Bind b1) v1))).(let H4 \def +(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with +[(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c0 k u) +(CHead e1 (Bind b1) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e: +C).(match e in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | +(CHead _ k0 _) \Rightarrow k0])) (CHead c0 k u) (CHead e1 (Bind b1) v1) H3) +in ((let H6 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda +(_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) +(CHead c0 k u) (CHead e1 (Bind b1) v1) H3) in (eq_ind C e1 (\lambda (c: +C).((eq K k (Bind b1)) \to ((eq T u v1) \to ((csuba g c1 c) \to (ex2_3 B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c1 k u) +(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: +T).(csuba g e2 e1))))))))) (\lambda (H7: (eq K k (Bind b1))).(eq_ind K (Bind +b1) (\lambda (k0: K).((eq T u v1) \to ((csuba g c1 e1) \to (ex2_3 B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c1 k0 u) +(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: +T).(csuba g e2 e1)))))))) (\lambda (H8: (eq T u v1)).(eq_ind T v1 (\lambda +(t: T).((csuba g c1 e1) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: +C).(\lambda (v2: T).(eq C (CHead c1 (Bind b1) t) (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))) +(\lambda (H9: (csuba g c1 e1)).(let H10 \def (eq_ind T u (\lambda (t: T).(eq +C (CHead c1 k t) c2)) H1 v1 H8) in (let H11 \def (eq_ind K k (\lambda (k0: +K).(eq C (CHead c1 k0 v1) c2)) H10 (Bind b1) H7) in (let H12 \def (eq_ind_r C +c2 (\lambda (c: C).(csuba g c (CHead e1 (Bind b1) v1))) H (CHead c1 (Bind b1) +v1) H11) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda +(v2: T).(eq C (CHead c1 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda +(_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))) b1 c1 v1 +(refl_equal C (CHead c1 (Bind b1) v1)) H9))))) u (sym_eq T u v1 H8))) k +(sym_eq K k (Bind b1) H7))) c0 (sym_eq C c0 e1 H6))) H5)) H4))) c2 H1 H2 +H0))) | (csuba_abst c1 c0 H0 t a H1 u H2) \Rightarrow (\lambda (H3: (eq C +(CHead c1 (Bind Abst) t) c2)).(\lambda (H4: (eq C (CHead c0 (Bind Abbr) u) +(CHead e1 (Bind b1) v1))).(eq_ind C (CHead c1 (Bind Abst) t) (\lambda (c: +C).((eq C (CHead c0 (Bind Abbr) u) (CHead e1 (Bind b1) v1)) \to ((csuba g c1 +c0) \to ((arity g c1 t (asucc g a)) \to ((arity g c0 u a) \to (ex2_3 B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind +b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 +e1)))))))))) (\lambda (H5: (eq C (CHead c0 (Bind Abbr) u) (CHead e1 (Bind b1) +v1))).(let H6 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda +(_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) +(CHead c0 (Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in ((let H7 \def +(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with +[(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k in K return +(\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow +Abbr])])) (CHead c0 (Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in ((let H8 +\def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) +with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 +(Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in (eq_ind C e1 (\lambda (c: +C).((eq B Abbr b1) \to ((eq T u v1) \to ((csuba g c1 c) \to ((arity g c1 t +(asucc g a)) \to ((arity g c u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda +(e2: C).(\lambda (v2: T).(eq C (CHead c1 (Bind Abst) t) (CHead e2 (Bind b2) +v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 +e1))))))))))) (\lambda (H9: (eq B Abbr b1)).(eq_ind B Abbr (\lambda (_: +B).((eq T u v1) \to ((csuba g c1 e1) \to ((arity g c1 t (asucc g a)) \to +((arity g e1 u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda +(v2: T).(eq C (CHead c1 (Bind Abst) t) (CHead e2 (Bind b2) v2))))) (\lambda +(_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))))) (\lambda +(H10: (eq T u v1)).(eq_ind T v1 (\lambda (t0: T).((csuba g c1 e1) \to ((arity +g c1 t (asucc g a)) \to ((arity g e1 t0 a) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c1 (Bind Abst) t) (CHead e2 +(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g +e2 e1))))))))) (\lambda (H11: (csuba g c1 e1)).(\lambda (_: (arity g c1 t +(asucc g a))).(\lambda (_: (arity g e1 v1 a)).(let H14 \def (eq_ind_r C c2 +(\lambda (c: C).(csuba g c (CHead e1 (Bind b1) v1))) H (CHead c1 (Bind Abst) +t) H3) in (let H15 \def (eq_ind_r B b1 (\lambda (b: B).(csuba g (CHead c1 +(Bind Abst) t) (CHead e1 (Bind b) v1))) H14 Abbr H9) in (ex2_3_intro B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c1 (Bind +Abst) t) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csuba g e2 e1)))) Abst c1 t (refl_equal C (CHead c1 (Bind +Abst) t)) H11)))))) u (sym_eq T u v1 H10))) b1 H9)) c0 (sym_eq C c0 e1 H8))) +H7)) H6))) c2 H3 H4 H0 H1 H2)))]) in (H0 (refl_equal C c2) (refl_equal C +(CHead e1 (Bind b1) v1))))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/getl.ma index 137b41453..3a72c1aed 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/getl.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/getl.ma @@ -473,3 +473,452 @@ c2 x7 x8 H20 (CHead x9 (Bind Abbr) x10) n H23) H24 H25 H26))))))))) H22)) H21)))))))) H17)))))) H14))))))) H11)))))))) i) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). +theorem csuba_getl_abst_rev: + \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall +(i: nat).((getl i c1 (CHead d1 (Bind Abst) u)) \to (\forall (c2: C).((csuba g +c2 c1) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1)))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda +(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abst) u))).(let H0 \def +(getl_gen_all c1 (CHead d1 (Bind Abst) u) i H) in (ex2_ind C (\lambda (e: +C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) u))) +(\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))) (\lambda (x: +C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind +Abst) u))).(C_ind (\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 +(Bind Abst) u)) \to (\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1)))))))) (\lambda (n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda +(H4: (clear (CSort n) (CHead d1 (Bind Abst) u))).(clear_gen_sort (CHead d1 +(Bind Abst) u) n H4 (\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 +(CHead d1 (Bind Abst) u)) \to (\forall (c2: C).((csuba g c2 c1) \to (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: +(drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 +(Bind Abst) u))).(K_ind (\lambda (k0: K).((drop i O c1 (CHead x0 k0 t)) \to +((clear (CHead x0 k0 t) (CHead d1 (Bind Abst) u)) \to (\forall (c2: +C).((csuba g c2 c1) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) (\lambda (b: B).(\lambda +(H5: (drop i O c1 (CHead x0 (Bind b) t))).(\lambda (H6: (clear (CHead x0 +(Bind b) t) (CHead d1 (Bind Abst) u))).(let H7 \def (f_equal C C (\lambda (e: +C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | +(CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in ((let H8 \def +(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with +[(CSort _) \Rightarrow Abst | (CHead _ k0 _) \Rightarrow (match k0 in K +return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow Abst])])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in ((let H9 \def +(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with +[(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind +Abst) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abst) u) +t H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 x0)).(\lambda +(c2: C).(\lambda (H12: (csuba g c2 c1)).(let H13 \def (eq_ind_r T t (\lambda +(t0: T).(drop i O c1 (CHead x0 (Bind b) t0))) H5 u H9) in (let H14 \def +(eq_ind_r B b (\lambda (b0: B).(drop i O c1 (CHead x0 (Bind b0) u))) H13 Abst +H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c +(Bind Abst) u))) H14 d1 H11) in (let H16 \def (csuba_drop_abst_rev i c1 d1 u +H15 g c2 H12) in (ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(getl i +c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda +(x1: C).(\lambda (H17: (drop i O c2 (CHead x1 (Bind Abst) u))).(\lambda (H18: +(csuba g x1 d1)).(ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x1 (getl_intro i c2 (CHead x1 +(Bind Abst) u) (CHead x1 (Bind Abst) u) H17 (clear_bind Abst x1 u)) H18)))) +H16)))))))))) H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead +x0 (Flat f) t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind +Abst) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c +(CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 c) \to (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))))))) (nat_ind (\lambda (n: nat).(\forall (x1: C).((drop n +O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) \to (ex2 C +(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)))))))) (\lambda (x1: C).(\lambda (H8: (drop O O x1 (CHead +x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g c2 x1)).(let H10 +\def (eq_ind C x1 (\lambda (c: C).(csuba g c2 c)) H9 (CHead x0 (Flat f) t) +(drop_gen_refl x1 (CHead x0 (Flat f) t) H8)) in (let H_y \def (clear_flat x0 +(CHead d1 (Bind Abst) u) (clear_gen_flat f x0 (CHead d1 (Bind Abst) u) t H6) +f t) in (let H11 \def (csuba_clear_trans g (CHead x0 (Flat f) t) c2 H10 +(CHead d1 (Bind Abst) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g e2 +(CHead d1 (Bind Abst) u))) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda +(d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))) (\lambda (x2: C).(\lambda (H12: (csuba g x2 (CHead d1 (Bind Abst) +u))).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abst_rev g d1 x2 +u H12) in (let H14 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(\lambda (x3: C).(\lambda (H15: (eq C x2 (CHead x3 (Bind Abst) u))).(\lambda +(H16: (csuba g x3 d1)).(let H17 \def (eq_ind C x2 (\lambda (c: C).(clear c2 +c)) H13 (CHead x3 (Bind Abst) u) H15) in (ex_intro2 C (\lambda (d2: C).(getl +O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x3 +(getl_intro O c2 (CHead x3 (Bind Abst) u) c2 (drop_refl c2) H17) H16))))) +H14)))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x1: +C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) +\to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda +(d2: C).(csuba g d2 d1))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n) O +x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g c2 +x1)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B +C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind +b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead +x0 (Flat f) t))))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x2: B).(\lambda (x3: +C).(\lambda (x4: T).(\lambda (H12: (clear x1 (CHead x3 (Bind x2) +x4))).(\lambda (H13: (drop n O x3 (CHead x0 (Flat f) t))).(let H14 \def +(csuba_clear_trans g x1 c2 H10 (CHead x3 (Bind x2) x4) H12) in (ex2_ind C +(\lambda (e2: C).(csuba g e2 (CHead x3 (Bind x2) x4))) (\lambda (e2: +C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x5: C).(\lambda (H15: +(csuba g x5 (CHead x3 (Bind x2) x4))).(\lambda (H16: (clear c2 x5)).(let H_x +\def (csuba_gen_bind_rev g x2 x3 x5 x4 H15) in (let H17 \def H_x in +(ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x5 +(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: +T).(csuba g e2 x3)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x6: B).(\lambda (x7: +C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) +x8))).(\lambda (H19: (csuba g x7 x3)).(let H20 \def (eq_ind C x5 (\lambda (c: +C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 +x7 H19) in (ex2_ind C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x9: +C).(\lambda (H22: (getl n x7 (CHead x9 (Bind Abst) u))).(\lambda (H23: (csuba +g x9 d1)).(ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1)) x9 (getl_clear_bind x6 c2 x7 x8 H20 +(CHead x9 (Bind Abst) u) n H22) H23)))) H21)))))))) H17)))))) H14))))))) +H11)))))))) i) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). + +theorem csuba_getl_abbr_rev: + \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).(\forall +(i: nat).((getl i c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba +g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda +(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abbr) u1))).(let H0 \def +(getl_gen_all c1 (CHead d1 (Bind Abbr) u1) i H) in (ex2_ind C (\lambda (e: +C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u1))) +(\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: +(clear x (CHead d1 (Bind Abbr) u1))).(C_ind (\lambda (c: C).((drop i O c1 c) +\to ((clear c (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba g c2 +c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))))) (\lambda +(n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) +(CHead d1 (Bind Abbr) u1))).(clear_gen_sort (CHead d1 (Bind Abbr) u1) n H4 +(\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear +x0 (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba g c2 c1) \to (or +(ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))))))))).(\lambda (k: K).(\lambda +(t: T).(\lambda (H3: (drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear +(CHead x0 k t) (CHead d1 (Bind Abbr) u1))).(K_ind (\lambda (k0: K).((drop i O +c1 (CHead x0 k0 t)) \to ((clear (CHead x0 k0 t) (CHead d1 (Bind Abbr) u1)) +\to (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i +c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))))))))) (\lambda (b: B).(\lambda (H5: (drop i O c1 (CHead x0 (Bind b) +t))).(\lambda (H6: (clear (CHead x0 (Bind b) t) (CHead d1 (Bind Abbr) +u1))).(let H7 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda +(_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) +(CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead +d1 (Bind Abbr) u1) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: +C).(match e in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | +(CHead _ k0 _) \Rightarrow (match k0 in K return (\lambda (_: K).B) with +[(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind +Abbr) u1) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) +u1) t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e in C return +(\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t0) +\Rightarrow t0])) (CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u1) t H6)) in (\lambda (H10: (eq B +Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: C).(\lambda (H12: (csuba +g c2 c1)).(let H13 \def (eq_ind_r T t (\lambda (t0: T).(drop i O c1 (CHead x0 +(Bind b) t0))) H5 u1 H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: +B).(drop i O c1 (CHead x0 (Bind b0) u1))) H13 Abbr H10) in (let H15 \def +(eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c (Bind Abbr) u1))) H14 d1 +H11) in (let H16 \def (csuba_drop_abbr_rev i c1 d1 u1 H15 g c2 H12) in +(or_ind (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H17: (ex2 C (\lambda +(d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1)))).(ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))) (\lambda (x1: C).(\lambda (H18: (drop i O c2 (CHead x1 (Bind Abbr) +u1))).(\lambda (H19: (csuba g x1 d1)).(or_introl (ex2 C (\lambda (d2: +C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x1 (getl_intro i c2 +(CHead x1 (Bind Abbr) u1) (CHead x1 (Bind Abbr) u1) H18 (clear_bind Abbr x1 +u1)) H19))))) H17)) (\lambda (H17: (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x1: +C).(\lambda (x2: T).(\lambda (x3: A).(\lambda (H18: (drop i O c2 (CHead x1 +(Bind Abst) x2))).(\lambda (H19: (csuba g x1 d1)).(\lambda (H20: (arity g x1 +x2 (asucc g x3))).(\lambda (H21: (arity g d1 u1 x3)).(or_intror (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x1 x2 x3 +(getl_intro i c2 (CHead x1 (Bind Abst) x2) (CHead x1 (Bind Abst) x2) H18 +(clear_bind Abst x1 x2)) H19 H20 H21))))))))) H17)) H16)))))))))) H8)) +H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead x0 (Flat f) +t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abbr) +u1))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c (CHead x0 +(Flat f) t)) \to (\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i +c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))))))) (nat_ind (\lambda (n: nat).(\forall (x1: +C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) +\to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))))) (\lambda +(x1: C).(\lambda (H8: (drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: +C).(\lambda (H9: (csuba g c2 x1)).(let H10 \def (eq_ind C x1 (\lambda (c: +C).(csuba g c2 c)) H9 (CHead x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat +f) t) H8)) in (let H_y \def (clear_flat x0 (CHead d1 (Bind Abbr) u1) +(clear_gen_flat f x0 (CHead d1 (Bind Abbr) u1) t H6) f t) in (let H11 \def +(csuba_clear_trans g (CHead x0 (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u1) +H_y) in (ex2_ind C (\lambda (e2: C).(csuba g e2 (CHead d1 (Bind Abbr) u1))) +(\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x2: C).(\lambda (H12: (csuba g x2 (CHead d1 (Bind Abbr) +u1))).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abbr_rev g d1 x2 +u1 H12) in (let H14 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C x2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H15: +(ex2 C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (x3: C).(\lambda (H16: (eq C x2 (CHead +x3 (Bind Abbr) u1))).(\lambda (H17: (csuba g x3 d1)).(let H18 \def (eq_ind C +x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abbr) u1) H16) in +(or_introl (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C +(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)) x3 (getl_intro O c2 (CHead x3 (Bind Abbr) u1) c2 +(drop_refl c2) H18) H17)))))) H15)) (\lambda (H15: (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(eq C x2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C (\lambda (d2: C).(getl +O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: A).(\lambda (H16: +(eq C x2 (CHead x3 (Bind Abst) x4))).(\lambda (H17: (csuba g x3 d1)).(\lambda +(H18: (arity g x3 x4 (asucc g x5))).(\lambda (H19: (arity g d1 u1 x5)).(let +H20 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abst) +x4) H16) in (or_intror (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O +c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))) x3 x4 x5 (getl_intro O c2 (CHead x3 (Bind Abst) +x4) c2 (drop_refl c2) H20) H17 H18 H19)))))))))) H15)) H14)))))) H11)))))))) +(\lambda (n: nat).(\lambda (H8: ((\forall (x1: C).((drop n O x1 (CHead x0 +(Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) \to (or (ex2 C (\lambda +(d2: C).(getl n c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n +c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S +n) O x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g c2 +x1)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B +C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind +b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead +x0 (Flat f) t))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: (clear x1 +(CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n O x3 (CHead x0 (Flat f) +t))).(let H14 \def (csuba_clear_trans g x1 c2 H10 (CHead x3 (Bind x2) x4) +H12) in (ex2_ind C (\lambda (e2: C).(csuba g e2 (CHead x3 (Bind x2) x4))) +(\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))) (\lambda (x5: C).(\lambda (H15: (csuba g x5 (CHead x3 (Bind x2) +x4))).(\lambda (H16: (clear c2 x5)).(let H_x \def (csuba_gen_bind_rev g x2 x3 +x5 x4 H15) in (let H17 \def H_x in (ex2_3_ind B C T (\lambda (b2: B).(\lambda +(e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 x3)))) (or (ex2 C (\lambda +(d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g +d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl +(S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x6: B).(\lambda (x7: +C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) +x8))).(\lambda (H19: (csuba g x7 x3)).(let H20 \def (eq_ind C x5 (\lambda (c: +C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 +x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or +(ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H22: +(ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: +C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S +n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (x9: C).(\lambda (H23: (getl n x7 +(CHead x9 (Bind Abbr) u1))).(\lambda (H24: (csuba g x9 d1)).(or_introl (ex2 C +(\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: +C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) u1) n H23) +H24))))) H22)) (\lambda (H22: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x9: C).(\lambda (x10: T).(\lambda (x11: A).(\lambda (H23: (getl n +x7 (CHead x9 (Bind Abst) x10))).(\lambda (H24: (csuba g x9 d1)).(\lambda +(H25: (arity g x9 x10 (asucc g x11))).(\lambda (H26: (arity g d1 u1 +x11)).(or_intror (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S +n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))) x9 x10 x11 (getl_clear_bind x6 c2 x7 x8 H20 +(CHead x9 (Bind Abst) x10) n H23) H24 H25 H26))))))))) H22)) H21)))))))) +H17)))))) H14))))))) H11)))))))) i) H7))))) k H3 H4))))))) x H1 H2)))) +H0))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/arity.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/arity.ma new file mode 100644 index 000000000..2cad21c83 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/arity.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/arity". + +include "csubc/csuba.ma". + +include "arity/defs.ma". + +theorem csubc_arity_conf: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to +(\forall (t: T).(\forall (a: A).((arity g c1 t a) \to (arity g c2 t a))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 +c2)).(\lambda (t: T).(\lambda (a: A).(\lambda (H0: (arity g c1 t +a)).(csuba_arity g c1 t a H0 c2 (csubc_csuba g c1 c2 H)))))))). + +theorem csubc_arity_trans: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to +(\forall (t: T).(\forall (a: A).((arity g c2 t a) \to (arity g c1 t a))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 +c2)).(\lambda (t: T).(\lambda (a: A).(\lambda (H0: (arity g c2 t +a)).(csuba_arity_rev g c2 t a H0 c1 (csubc_csuba g c1 c2 H)))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/clear.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/clear.ma new file mode 100644 index 000000000..ab46f2baa --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/clear.ma @@ -0,0 +1,149 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/clear". + +include "csubc/defs.ma". + +theorem csubc_clear_conf: + \forall (g: G).(\forall (c1: C).(\forall (e1: C).((clear c1 e1) \to (\forall +(c2: C).((csubc g c1 c2) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda +(e2: C).(csubc g e1 e2)))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (e1: C).(\lambda (H: (clear c1 +e1)).(clear_ind (\lambda (c: C).(\lambda (c0: C).(\forall (c2: C).((csubc g c +c2) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g c0 +e2))))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(\lambda (c2: +C).(\lambda (H0: (csubc g (CHead e (Bind b) u) c2)).(let H1 \def (match H0 in +csubc return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csubc ? c +c0)).((eq C c (CHead e (Bind b) u)) \to ((eq C c0 c2) \to (ex2 C (\lambda +(e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g (CHead e (Bind b) u) +e2)))))))) with [(csubc_sort n) \Rightarrow (\lambda (H1: (eq C (CSort n) +(CHead e (Bind b) u))).(\lambda (H2: (eq C (CSort n) c2)).((let H3 \def +(eq_ind C (CSort n) (\lambda (e0: C).(match e0 in C return (\lambda (_: +C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow +False])) I (CHead e (Bind b) u) H1) in (False_ind ((eq C (CSort n) c2) \to +(ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g (CHead e +(Bind b) u) e2)))) H3)) H2))) | (csubc_head c0 c3 H1 k v) \Rightarrow +(\lambda (H2: (eq C (CHead c0 k v) (CHead e (Bind b) u))).(\lambda (H3: (eq C +(CHead c3 k v) c2)).((let H4 \def (f_equal C T (\lambda (e0: C).(match e0 in +C return (\lambda (_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) +\Rightarrow t])) (CHead c0 k v) (CHead e (Bind b) u) H2) in ((let H5 \def +(f_equal C K (\lambda (e0: C).(match e0 in C return (\lambda (_: C).K) with +[(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c0 k v) +(CHead e (Bind b) u) H2) in ((let H6 \def (f_equal C C (\lambda (e0: +C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | +(CHead c _ _) \Rightarrow c])) (CHead c0 k v) (CHead e (Bind b) u) H2) in +(eq_ind C e (\lambda (c: C).((eq K k (Bind b)) \to ((eq T v u) \to ((eq C +(CHead c3 k v) c2) \to ((csubc g c c3) \to (ex2 C (\lambda (e2: C).(clear c2 +e2)) (\lambda (e2: C).(csubc g (CHead e (Bind b) u) e2)))))))) (\lambda (H7: +(eq K k (Bind b))).(eq_ind K (Bind b) (\lambda (k0: K).((eq T v u) \to ((eq C +(CHead c3 k0 v) c2) \to ((csubc g e c3) \to (ex2 C (\lambda (e2: C).(clear c2 +e2)) (\lambda (e2: C).(csubc g (CHead e (Bind b) u) e2))))))) (\lambda (H8: +(eq T v u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c3 (Bind b) t) c2) \to +((csubc g e c3) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: +C).(csubc g (CHead e (Bind b) u) e2)))))) (\lambda (H9: (eq C (CHead c3 (Bind +b) u) c2)).(eq_ind C (CHead c3 (Bind b) u) (\lambda (c: C).((csubc g e c3) +\to (ex2 C (\lambda (e2: C).(clear c e2)) (\lambda (e2: C).(csubc g (CHead e +(Bind b) u) e2))))) (\lambda (H10: (csubc g e c3)).(ex_intro2 C (\lambda (e2: +C).(clear (CHead c3 (Bind b) u) e2)) (\lambda (e2: C).(csubc g (CHead e (Bind +b) u) e2)) (CHead c3 (Bind b) u) (clear_bind b c3 u) (csubc_head g e c3 H10 +(Bind b) u))) c2 H9)) v (sym_eq T v u H8))) k (sym_eq K k (Bind b) H7))) c0 +(sym_eq C c0 e H6))) H5)) H4)) H3 H1))) | (csubc_abst c0 c3 H1 v a H2 w H3) +\Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind Abst) v) (CHead e (Bind b) +u))).(\lambda (H5: (eq C (CHead c3 (Bind Abbr) w) c2)).((let H6 \def (f_equal +C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) +\Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead c0 (Bind Abst) v) +(CHead e (Bind b) u) H4) in ((let H7 \def (f_equal C B (\lambda (e0: +C).(match e0 in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst +| (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).B) with +[(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abst])])) (CHead c0 (Bind +Abst) v) (CHead e (Bind b) u) H4) in ((let H8 \def (f_equal C C (\lambda (e0: +C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | +(CHead c _ _) \Rightarrow c])) (CHead c0 (Bind Abst) v) (CHead e (Bind b) u) +H4) in (eq_ind C e (\lambda (c: C).((eq B Abst b) \to ((eq T v u) \to ((eq C +(CHead c3 (Bind Abbr) w) c2) \to ((csubc g c c3) \to ((sc3 g (asucc g a) c v) +\to ((sc3 g a c3 w) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: +C).(csubc g (CHead e (Bind b) u) e2)))))))))) (\lambda (H9: (eq B Abst +b)).(eq_ind B Abst (\lambda (b0: B).((eq T v u) \to ((eq C (CHead c3 (Bind +Abbr) w) c2) \to ((csubc g e c3) \to ((sc3 g (asucc g a) e v) \to ((sc3 g a +c3 w) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g +(CHead e (Bind b0) u) e2))))))))) (\lambda (H10: (eq T v u)).(eq_ind T u +(\lambda (t: T).((eq C (CHead c3 (Bind Abbr) w) c2) \to ((csubc g e c3) \to +((sc3 g (asucc g a) e t) \to ((sc3 g a c3 w) \to (ex2 C (\lambda (e2: +C).(clear c2 e2)) (\lambda (e2: C).(csubc g (CHead e (Bind Abst) u) +e2)))))))) (\lambda (H11: (eq C (CHead c3 (Bind Abbr) w) c2)).(eq_ind C +(CHead c3 (Bind Abbr) w) (\lambda (c: C).((csubc g e c3) \to ((sc3 g (asucc g +a) e u) \to ((sc3 g a c3 w) \to (ex2 C (\lambda (e2: C).(clear c e2)) +(\lambda (e2: C).(csubc g (CHead e (Bind Abst) u) e2))))))) (\lambda (H12: +(csubc g e c3)).(\lambda (H13: (sc3 g (asucc g a) e u)).(\lambda (H14: (sc3 g +a c3 w)).(ex_intro2 C (\lambda (e2: C).(clear (CHead c3 (Bind Abbr) w) e2)) +(\lambda (e2: C).(csubc g (CHead e (Bind Abst) u) e2)) (CHead c3 (Bind Abbr) +w) (clear_bind Abbr c3 w) (csubc_abst g e c3 H12 u a H13 w H14))))) c2 H11)) +v (sym_eq T v u H10))) b H9)) c0 (sym_eq C c0 e H8))) H7)) H6)) H5 H1 H2 +H3)))]) in (H1 (refl_equal C (CHead e (Bind b) u)) (refl_equal C c2)))))))) +(\lambda (e: C).(\lambda (c: C).(\lambda (_: (clear e c)).(\lambda (H1: +((\forall (c2: C).((csubc g e c2) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) +(\lambda (e2: C).(csubc g c e2))))))).(\lambda (f: F).(\lambda (u: +T).(\lambda (c2: C).(\lambda (H2: (csubc g (CHead e (Flat f) u) c2)).(let H3 +\def (match H2 in csubc return (\lambda (c0: C).(\lambda (c3: C).(\lambda (_: +(csubc ? c0 c3)).((eq C c0 (CHead e (Flat f) u)) \to ((eq C c3 c2) \to (ex2 C +(\lambda (e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g c e2)))))))) with +[(csubc_sort n) \Rightarrow (\lambda (H3: (eq C (CSort n) (CHead e (Flat f) +u))).(\lambda (H4: (eq C (CSort n) c2)).((let H5 \def (eq_ind C (CSort n) +(\lambda (e0: C).(match e0 in C return (\lambda (_: C).Prop) with [(CSort _) +\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e (Flat f) u) +H3) in (False_ind ((eq C (CSort n) c2) \to (ex2 C (\lambda (e2: C).(clear c2 +e2)) (\lambda (e2: C).(csubc g c e2)))) H5)) H4))) | (csubc_head c0 c3 H3 k +v) \Rightarrow (\lambda (H4: (eq C (CHead c0 k v) (CHead e (Flat f) +u))).(\lambda (H5: (eq C (CHead c3 k v) c2)).((let H6 \def (f_equal C T +(\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) +\Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead c0 k v) (CHead e (Flat +f) u) H4) in ((let H7 \def (f_equal C K (\lambda (e0: C).(match e0 in C +return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) +\Rightarrow k0])) (CHead c0 k v) (CHead e (Flat f) u) H4) in ((let H8 \def +(f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with +[(CSort _) \Rightarrow c0 | (CHead c4 _ _) \Rightarrow c4])) (CHead c0 k v) +(CHead e (Flat f) u) H4) in (eq_ind C e (\lambda (c4: C).((eq K k (Flat f)) +\to ((eq T v u) \to ((eq C (CHead c3 k v) c2) \to ((csubc g c4 c3) \to (ex2 C +(\lambda (e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g c e2)))))))) +(\lambda (H9: (eq K k (Flat f))).(eq_ind K (Flat f) (\lambda (k0: K).((eq T v +u) \to ((eq C (CHead c3 k0 v) c2) \to ((csubc g e c3) \to (ex2 C (\lambda +(e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g c e2))))))) (\lambda (H10: +(eq T v u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c3 (Flat f) t) c2) \to +((csubc g e c3) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: +C).(csubc g c e2)))))) (\lambda (H11: (eq C (CHead c3 (Flat f) u) +c2)).(eq_ind C (CHead c3 (Flat f) u) (\lambda (c4: C).((csubc g e c3) \to +(ex2 C (\lambda (e2: C).(clear c4 e2)) (\lambda (e2: C).(csubc g c e2))))) +(\lambda (H12: (csubc g e c3)).(let H_x \def (H1 c3 H12) in (let H13 \def H_x +in (ex2_ind C (\lambda (e2: C).(clear c3 e2)) (\lambda (e2: C).(csubc g c +e2)) (ex2 C (\lambda (e2: C).(clear (CHead c3 (Flat f) u) e2)) (\lambda (e2: +C).(csubc g c e2))) (\lambda (x: C).(\lambda (H14: (clear c3 x)).(\lambda +(H15: (csubc g c x)).(ex_intro2 C (\lambda (e2: C).(clear (CHead c3 (Flat f) +u) e2)) (\lambda (e2: C).(csubc g c e2)) x (clear_flat c3 x H14 f u) H15)))) +H13)))) c2 H11)) v (sym_eq T v u H10))) k (sym_eq K k (Flat f) H9))) c0 +(sym_eq C c0 e H8))) H7)) H6)) H5 H3))) | (csubc_abst c0 c3 H3 v a H4 w H5) +\Rightarrow (\lambda (H6: (eq C (CHead c0 (Bind Abst) v) (CHead e (Flat f) +u))).(\lambda (H7: (eq C (CHead c3 (Bind Abbr) w) c2)).((let H8 \def (eq_ind +C (CHead c0 (Bind Abst) v) (\lambda (e0: C).(match e0 in C return (\lambda +(_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow +(match k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | +(Flat _) \Rightarrow False])])) I (CHead e (Flat f) u) H6) in (False_ind ((eq +C (CHead c3 (Bind Abbr) w) c2) \to ((csubc g c0 c3) \to ((sc3 g (asucc g a) +c0 v) \to ((sc3 g a c3 w) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda +(e2: C).(csubc g c e2))))))) H8)) H7 H3 H4 H5)))]) in (H3 (refl_equal C +(CHead e (Flat f) u)) (refl_equal C c2))))))))))) c1 e1 H)))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/csuba.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/csuba.ma new file mode 100644 index 000000000..783c668e6 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/csuba.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/csuba". + +include "csubc/defs.ma". + +include "sc3/props.ma". + +include "csuba/defs.ma". + +theorem csubc_csuba: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (csuba +g c1 c2)))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 +c2)).(csubc_ind g (\lambda (c: C).(\lambda (c0: C).(csuba g c c0))) (\lambda +(n: nat).(csuba_refl g (CSort n))) (\lambda (c3: C).(\lambda (c4: C).(\lambda +(_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (k: K).(\lambda +(v: T).(csuba_head g c3 c4 H1 k v))))))) (\lambda (c3: C).(\lambda (c4: +C).(\lambda (_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (v: +T).(\lambda (a: A).(\lambda (H2: (sc3 g (asucc g a) c3 v)).(\lambda (w: +T).(\lambda (H3: (sc3 g a c4 w)).(csuba_abst g c3 c4 H1 v a (sc3_arity_gen g +c3 v (asucc g a) H2) w (sc3_arity_gen g c4 w a H3))))))))))) c1 c2 H)))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ceqc/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/defs.ma similarity index 85% rename from matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ceqc/defs.ma rename to matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/defs.ma index 91ae5de91..8f5830604 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ceqc/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/defs.ma @@ -14,11 +14,11 @@ (* This file was automatically generated: do not edit *********************) -set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/ceqc/defs". +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/defs". include "sc3/defs.ma". -inductive csubc (g:G): C \to (C \to Prop) \def +inductive csubc (g: G): C \to (C \to Prop) \def | csubc_sort: \forall (n: nat).(csubc g (CSort n) (CSort n)) | csubc_head: \forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (\forall (k: K).(\forall (v: T).(csubc g (CHead c1 k v) (CHead c2 k v)))))) @@ -27,9 +27,3 @@ inductive csubc (g:G): C \to (C \to Prop) \def a c2 w) \to (csubc g (CHead c1 (Bind Abst) v) (CHead c2 (Bind Abbr) w))))))))). -definition ceqc: - G \to (C \to (C \to Prop)) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(or (csubc g c1 c2) (csubc -g c2 c1)))). - diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ceqc/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/drop.ma similarity index 61% rename from matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ceqc/props.ma rename to matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/drop.ma index 7ed7c50d2..f2d90423d 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ceqc/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/drop.ma @@ -14,28 +14,123 @@ (* This file was automatically generated: do not edit *********************) -set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/ceqc/props". +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/drop". -include "ceqc/defs.ma". +include "csubc/defs.ma". include "sc3/props.ma". -theorem csubc_refl: - \forall (g: G).(\forall (c: C).(csubc g c c)) +theorem csubc_drop_conf_O: + \forall (g: G).(\forall (c1: C).(\forall (e1: C).(\forall (h: nat).((drop h +O c1 e1) \to (\forall (c2: C).((csubc g c1 c2) \to (ex2 C (\lambda (e2: +C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 e2))))))))) \def - \lambda (g: G).(\lambda (c: C).(C_ind (\lambda (c0: C).(csubc g c0 c0)) -(\lambda (n: nat).(csubc_sort g n)) (\lambda (c0: C).(\lambda (H: (csubc g c0 -c0)).(\lambda (k: K).(\lambda (t: T).(csubc_head g c0 c0 H k t))))) c)). - -theorem ceqc_sym: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((ceqc g c1 c2) \to (ceqc g -c2 c1)))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (ceqc g c1 -c2)).(let H0 \def H in (or_ind (csubc g c1 c2) (csubc g c2 c1) (ceqc g c2 c1) -(\lambda (H1: (csubc g c1 c2)).(or_intror (csubc g c2 c1) (csubc g c1 c2) -H1)) (\lambda (H1: (csubc g c2 c1)).(or_introl (csubc g c2 c1) (csubc g c1 -c2) H1)) H0))))). + \lambda (g: G).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (e1: +C).(\forall (h: nat).((drop h O c e1) \to (\forall (c2: C).((csubc g c c2) +\to (ex2 C (\lambda (e2: C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 +e2))))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (h: nat).(\lambda (H: +(drop h O (CSort n) e1)).(\lambda (c2: C).(\lambda (H0: (csubc g (CSort n) +c2)).(and3_ind (eq C e1 (CSort n)) (eq nat h O) (eq nat O O) (ex2 C (\lambda +(e2: C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 e2))) (\lambda (H1: +(eq C e1 (CSort n))).(\lambda (H2: (eq nat h O)).(\lambda (_: (eq nat O +O)).(eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (e2: C).(drop n0 O c2 +e2)) (\lambda (e2: C).(csubc g e1 e2)))) (eq_ind_r C (CSort n) (\lambda (c: +C).(ex2 C (\lambda (e2: C).(drop O O c2 e2)) (\lambda (e2: C).(csubc g c +e2)))) (ex_intro2 C (\lambda (e2: C).(drop O O c2 e2)) (\lambda (e2: +C).(csubc g (CSort n) e2)) c2 (drop_refl c2) H0) e1 H1) h H2)))) +(drop_gen_sort n h O e1 H)))))))) (\lambda (c: C).(\lambda (H: ((\forall (e1: +C).(\forall (h: nat).((drop h O c e1) \to (\forall (c2: C).((csubc g c c2) +\to (ex2 C (\lambda (e2: C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 +e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (h: +nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c k t) e1) \to (\forall +(c2: C).((csubc g (CHead c k t) c2) \to (ex2 C (\lambda (e2: C).(drop n O c2 +e2)) (\lambda (e2: C).(csubc g e1 e2))))))) (\lambda (H0: (drop O O (CHead c +k t) e1)).(\lambda (c2: C).(\lambda (H1: (csubc g (CHead c k t) c2)).(eq_ind +C (CHead c k t) (\lambda (c0: C).(ex2 C (\lambda (e2: C).(drop O O c2 e2)) +(\lambda (e2: C).(csubc g c0 e2)))) (ex_intro2 C (\lambda (e2: C).(drop O O +c2 e2)) (\lambda (e2: C).(csubc g (CHead c k t) e2)) c2 (drop_refl c2) H1) e1 +(drop_gen_refl (CHead c k t) e1 H0))))) (\lambda (n: nat).(\lambda (H0: +(((drop n O (CHead c k t) e1) \to (\forall (c2: C).((csubc g (CHead c k t) +c2) \to (ex2 C (\lambda (e2: C).(drop n O c2 e2)) (\lambda (e2: C).(csubc g +e1 e2)))))))).(\lambda (H1: (drop (S n) O (CHead c k t) e1)).(\lambda (c2: +C).(\lambda (H2: (csubc g (CHead c k t) c2)).(let H3 \def (match H2 in csubc +return (\lambda (c0: C).(\lambda (c3: C).(\lambda (_: (csubc ? c0 c3)).((eq C +c0 (CHead c k t)) \to ((eq C c3 c2) \to (ex2 C (\lambda (e2: C).(drop (S n) O +c2 e2)) (\lambda (e2: C).(csubc g e1 e2)))))))) with [(csubc_sort n0) +\Rightarrow (\lambda (H3: (eq C (CSort n0) (CHead c k t))).(\lambda (H4: (eq +C (CSort n0) c2)).((let H5 \def (eq_ind C (CSort n0) (\lambda (e: C).(match e +in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ +_ _) \Rightarrow False])) I (CHead c k t) H3) in (False_ind ((eq C (CSort n0) +c2) \to (ex2 C (\lambda (e2: C).(drop (S n) O c2 e2)) (\lambda (e2: C).(csubc +g e1 e2)))) H5)) H4))) | (csubc_head c0 c3 H3 k0 v) \Rightarrow (\lambda (H4: +(eq C (CHead c0 k0 v) (CHead c k t))).(\lambda (H5: (eq C (CHead c3 k0 v) +c2)).((let H6 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda +(_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t0) \Rightarrow t0])) +(CHead c0 k0 v) (CHead c k t) H4) in ((let H7 \def (f_equal C K (\lambda (e: +C).(match e in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | +(CHead _ k1 _) \Rightarrow k1])) (CHead c0 k0 v) (CHead c k t) H4) in ((let +H8 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) +with [(CSort _) \Rightarrow c0 | (CHead c4 _ _) \Rightarrow c4])) (CHead c0 +k0 v) (CHead c k t) H4) in (eq_ind C c (\lambda (c4: C).((eq K k0 k) \to ((eq +T v t) \to ((eq C (CHead c3 k0 v) c2) \to ((csubc g c4 c3) \to (ex2 C +(\lambda (e2: C).(drop (S n) O c2 e2)) (\lambda (e2: C).(csubc g e1 +e2)))))))) (\lambda (H9: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T v +t) \to ((eq C (CHead c3 k1 v) c2) \to ((csubc g c c3) \to (ex2 C (\lambda +(e2: C).(drop (S n) O c2 e2)) (\lambda (e2: C).(csubc g e1 e2))))))) (\lambda +(H10: (eq T v t)).(eq_ind T t (\lambda (t0: T).((eq C (CHead c3 k t0) c2) \to +((csubc g c c3) \to (ex2 C (\lambda (e2: C).(drop (S n) O c2 e2)) (\lambda +(e2: C).(csubc g e1 e2)))))) (\lambda (H11: (eq C (CHead c3 k t) c2)).(eq_ind +C (CHead c3 k t) (\lambda (c4: C).((csubc g c c3) \to (ex2 C (\lambda (e2: +C).(drop (S n) O c4 e2)) (\lambda (e2: C).(csubc g e1 e2))))) (\lambda (H12: +(csubc g c c3)).(let H_x \def (H e1 (r k n) (drop_gen_drop k c e1 t n H1) c3 +H12) in (let H13 \def H_x in (ex2_ind C (\lambda (e2: C).(drop (r k n) O c3 +e2)) (\lambda (e2: C).(csubc g e1 e2)) (ex2 C (\lambda (e2: C).(drop (S n) O +(CHead c3 k t) e2)) (\lambda (e2: C).(csubc g e1 e2))) (\lambda (x: +C).(\lambda (H14: (drop (r k n) O c3 x)).(\lambda (H15: (csubc g e1 +x)).(ex_intro2 C (\lambda (e2: C).(drop (S n) O (CHead c3 k t) e2)) (\lambda +(e2: C).(csubc g e1 e2)) x (drop_drop k n c3 x H14 t) H15)))) H13)))) c2 +H11)) v (sym_eq T v t H10))) k0 (sym_eq K k0 k H9))) c0 (sym_eq C c0 c H8))) +H7)) H6)) H5 H3))) | (csubc_abst c0 c3 H3 v a H4 w H5) \Rightarrow (\lambda +(H6: (eq C (CHead c0 (Bind Abst) v) (CHead c k t))).(\lambda (H7: (eq C +(CHead c3 (Bind Abbr) w) c2)).((let H8 \def (f_equal C T (\lambda (e: +C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow v | +(CHead _ _ t0) \Rightarrow t0])) (CHead c0 (Bind Abst) v) (CHead c k t) H6) +in ((let H9 \def (f_equal C K (\lambda (e: C).(match e in C return (\lambda +(_: C).K) with [(CSort _) \Rightarrow (Bind Abst) | (CHead _ k0 _) +\Rightarrow k0])) (CHead c0 (Bind Abst) v) (CHead c k t) H6) in ((let H10 +\def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) +with [(CSort _) \Rightarrow c0 | (CHead c4 _ _) \Rightarrow c4])) (CHead c0 +(Bind Abst) v) (CHead c k t) H6) in (eq_ind C c (\lambda (c4: C).((eq K (Bind +Abst) k) \to ((eq T v t) \to ((eq C (CHead c3 (Bind Abbr) w) c2) \to ((csubc +g c4 c3) \to ((sc3 g (asucc g a) c4 v) \to ((sc3 g a c3 w) \to (ex2 C +(\lambda (e2: C).(drop (S n) O c2 e2)) (\lambda (e2: C).(csubc g e1 +e2)))))))))) (\lambda (H11: (eq K (Bind Abst) k)).(eq_ind K (Bind Abst) +(\lambda (_: K).((eq T v t) \to ((eq C (CHead c3 (Bind Abbr) w) c2) \to +((csubc g c c3) \to ((sc3 g (asucc g a) c v) \to ((sc3 g a c3 w) \to (ex2 C +(\lambda (e2: C).(drop (S n) O c2 e2)) (\lambda (e2: C).(csubc g e1 +e2))))))))) (\lambda (H12: (eq T v t)).(eq_ind T t (\lambda (t0: T).((eq C +(CHead c3 (Bind Abbr) w) c2) \to ((csubc g c c3) \to ((sc3 g (asucc g a) c +t0) \to ((sc3 g a c3 w) \to (ex2 C (\lambda (e2: C).(drop (S n) O c2 e2)) +(\lambda (e2: C).(csubc g e1 e2)))))))) (\lambda (H13: (eq C (CHead c3 (Bind +Abbr) w) c2)).(eq_ind C (CHead c3 (Bind Abbr) w) (\lambda (c4: C).((csubc g c +c3) \to ((sc3 g (asucc g a) c t) \to ((sc3 g a c3 w) \to (ex2 C (\lambda (e2: +C).(drop (S n) O c4 e2)) (\lambda (e2: C).(csubc g e1 e2))))))) (\lambda +(H14: (csubc g c c3)).(\lambda (_: (sc3 g (asucc g a) c t)).(\lambda (_: (sc3 +g a c3 w)).(let H17 \def (eq_ind_r K k (\lambda (k0: K).(drop (r k0 n) O c +e1)) (drop_gen_drop k c e1 t n H1) (Bind Abst) H11) in (let H18 \def +(eq_ind_r K k (\lambda (k0: K).((drop n O (CHead c k0 t) e1) \to (\forall +(c4: C).((csubc g (CHead c k0 t) c4) \to (ex2 C (\lambda (e2: C).(drop n O c4 +e2)) (\lambda (e2: C).(csubc g e1 e2))))))) H0 (Bind Abst) H11) in (let H_x +\def (H e1 (r (Bind Abst) n) H17 c3 H14) in (let H19 \def H_x in (ex2_ind C +(\lambda (e2: C).(drop (r (Bind Abst) n) O c3 e2)) (\lambda (e2: C).(csubc g +e1 e2)) (ex2 C (\lambda (e2: C).(drop (S n) O (CHead c3 (Bind Abbr) w) e2)) +(\lambda (e2: C).(csubc g e1 e2))) (\lambda (x: C).(\lambda (H20: (drop (r +(Bind Abst) n) O c3 x)).(\lambda (H21: (csubc g e1 x)).(ex_intro2 C (\lambda +(e2: C).(drop (S n) O (CHead c3 (Bind Abbr) w) e2)) (\lambda (e2: C).(csubc g +e1 e2)) x (drop_drop (Bind Abbr) n c3 x H20 w) H21)))) H19)))))))) c2 H13)) v +(sym_eq T v t H12))) k H11)) c0 (sym_eq C c0 c H10))) H9)) H8)) H7 H3 H4 +H5)))]) in (H3 (refl_equal C (CHead c k t)) (refl_equal C c2)))))))) h))))))) +c1)). theorem drop_csubc_trans: \forall (g: G).(\forall (c2: C).(\forall (e2: C).(\forall (d: nat).(\forall @@ -353,211 +448,3 @@ T w x1 H19))) k H18)) c0 (sym_eq C c0 x0 H17))) H16)) H15))) e1 H12 H13 H9 H10 H11)))]) in (H9 (refl_equal C e1) (refl_equal C (CHead x0 k x1)))) t H4))))))))) (drop_gen_skip_l c e2 t h n k H1)))))))) d))))))) c2)). -theorem drop1_csubc_trans: - \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: -C).((drop1 hds c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C -(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(csubc g c2 c1))))))))) -\def - \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall -(c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 -e1) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 -c1))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 -e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e2 e1)).(let H1 \def (match H in -drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda -(_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 e2) \to -(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c2 -c1)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil -PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c e2)).(eq_ind C c2 -(\lambda (c0: C).((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 -e1)) (\lambda (c1: C).(csubc g c2 c1))))) (\lambda (H4: (eq C c2 e2)).(eq_ind -C e2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda -(c1: C).(csubc g c0 c1)))) (let H5 \def (eq_ind_r C e2 (\lambda (c0: -C).(csubc g c0 e1)) H0 c2 H4) in (eq_ind C c2 (\lambda (c0: C).(ex2 C -(\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c0 c1)))) -(ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g -c2 c1)) e1 (drop1_nil e1) H5) e2 H4)) c2 (sym_eq C c2 e2 H4))) c (sym_eq C c -c2 H2) H3)))) | (drop1_cons c1 c0 h d H1 c3 hds0 H2) \Rightarrow (\lambda -(H3: (eq PList (PCons h d hds0) PNil)).(\lambda (H4: (eq C c1 c2)).(\lambda -(H5: (eq C c3 e2)).((let H6 \def (eq_ind PList (PCons h d hds0) (\lambda (e: -PList).(match e in PList return (\lambda (_: PList).Prop) with [PNil -\Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in -(False_ind ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop h d c1 c0) \to ((drop1 -hds0 c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 PNil c4 e1)) (\lambda (c4: -C).(csubc g c2 c4))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList -PNil) (refl_equal C c2) (refl_equal C e2)))))))) (\lambda (n: nat).(\lambda -(n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: C).(\forall (e2: -C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda -(c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 c1)))))))))).(\lambda -(c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n n0 p) c2 e2)).(\lambda -(e1: C).(\lambda (H1: (csubc g e2 e1)).(let H2 \def (match H0 in drop1 return -(\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p0 -c c0)).((eq PList p0 (PCons n n0 p)) \to ((eq C c c2) \to ((eq C c0 e2) \to -(ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc -g c2 c1)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList -PNil (PCons n n0 p))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c -e2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e in PList -return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) -\Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c2) \to ((eq -C c e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda -(c1: C).(csubc g c2 c1))))) H5)) H3 H4)))) | (drop1_cons c1 c0 h d H2 c3 hds0 -H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds0) (PCons n n0 -p))).(\lambda (H5: (eq C c1 c2)).(\lambda (H6: (eq C c3 e2)).((let H7 \def -(f_equal PList PList (\lambda (e: PList).(match e in PList return (\lambda -(_: PList).PList) with [PNil \Rightarrow hds0 | (PCons _ _ p0) \Rightarrow -p0])) (PCons h d hds0) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat -(\lambda (e: PList).(match e in PList return (\lambda (_: PList).nat) with -[PNil \Rightarrow d | (PCons _ n1 _) \Rightarrow n1])) (PCons h d hds0) -(PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: -PList).(match e in PList return (\lambda (_: PList).nat) with [PNil -\Rightarrow h | (PCons n1 _ _) \Rightarrow n1])) (PCons h d hds0) (PCons n n0 -p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds0 -p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n1 d c1 c0) \to ((drop1 -hds0 c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) -(\lambda (c4: C).(csubc g c2 c4)))))))))) (\lambda (H10: (eq nat d -n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds0 p) \to ((eq C c1 c2) -\to ((eq C c3 e2) \to ((drop n n1 c1 c0) \to ((drop1 hds0 c0 c3) \to (ex2 C -(\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c2 -c4))))))))) (\lambda (H11: (eq PList hds0 p)).(eq_ind PList p (\lambda (p0: -PList).((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n0 c1 c0) \to ((drop1 p0 -c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda -(c4: C).(csubc g c2 c4)))))))) (\lambda (H12: (eq C c1 c2)).(eq_ind C c2 -(\lambda (c: C).((eq C c3 e2) \to ((drop n n0 c c0) \to ((drop1 p c0 c3) \to -(ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc -g c2 c4))))))) (\lambda (H13: (eq C c3 e2)).(eq_ind C e2 (\lambda (c: -C).((drop n n0 c2 c0) \to ((drop1 p c0 c) \to (ex2 C (\lambda (c4: C).(drop1 -(PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c2 c4)))))) (\lambda (H14: -(drop n n0 c2 c0)).(\lambda (H15: (drop1 p c0 e2)).(let H_x \def (H c0 e2 H15 -e1 H1) in (let H16 \def H_x in (ex2_ind C (\lambda (c4: C).(drop1 p c4 e1)) -(\lambda (c4: C).(csubc g c0 c4)) (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 -p) c4 e1)) (\lambda (c4: C).(csubc g c2 c4))) (\lambda (x: C).(\lambda (H17: -(drop1 p x e1)).(\lambda (H18: (csubc g c0 x)).(let H_x0 \def -(drop_csubc_trans g c2 c0 n0 n H14 x H18) in (let H19 \def H_x0 in (ex2_ind C -(\lambda (c4: C).(drop n n0 c4 x)) (\lambda (c4: C).(csubc g c2 c4)) (ex2 C -(\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c2 -c4))) (\lambda (x0: C).(\lambda (H20: (drop n n0 x0 x)).(\lambda (H21: (csubc -g c2 x0)).(ex_intro2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) -(\lambda (c4: C).(csubc g c2 c4)) x0 (drop1_cons x0 x n n0 H20 e1 p H17) -H21)))) H19)))))) H16))))) c3 (sym_eq C c3 e2 H13))) c1 (sym_eq C c1 c2 -H12))) hds0 (sym_eq PList hds0 p H11))) d (sym_eq nat d n0 H10))) h (sym_eq -nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n -n0 p)) (refl_equal C c2) (refl_equal C e2)))))))))))) hds)). - -theorem csubc_drop1_conf_rev: - \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: -C).((drop1 hds c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C -(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(csubc g c1 c2))))))))) -\def - \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall -(c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 -e2) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 -c2))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 -e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e1 e2)).(let H1 \def (match H in -drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda -(_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 e2) \to -(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 -c2)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil -PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c e2)).(eq_ind C c2 -(\lambda (c0: C).((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 -e1)) (\lambda (c1: C).(csubc g c1 c2))))) (\lambda (H4: (eq C c2 e2)).(eq_ind -C e2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda -(c1: C).(csubc g c1 c0)))) (let H5 \def (eq_ind_r C e2 (\lambda (c0: -C).(csubc g e1 c0)) H0 c2 H4) in (eq_ind C c2 (\lambda (c0: C).(ex2 C -(\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c0)))) -(ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g -c1 c2)) e1 (drop1_nil e1) H5) e2 H4)) c2 (sym_eq C c2 e2 H4))) c (sym_eq C c -c2 H2) H3)))) | (drop1_cons c1 c0 h d H1 c3 hds0 H2) \Rightarrow (\lambda -(H3: (eq PList (PCons h d hds0) PNil)).(\lambda (H4: (eq C c1 c2)).(\lambda -(H5: (eq C c3 e2)).((let H6 \def (eq_ind PList (PCons h d hds0) (\lambda (e: -PList).(match e in PList return (\lambda (_: PList).Prop) with [PNil -\Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in -(False_ind ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop h d c1 c0) \to ((drop1 -hds0 c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 PNil c4 e1)) (\lambda (c4: -C).(csubc g c4 c2))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList -PNil) (refl_equal C c2) (refl_equal C e2)))))))) (\lambda (n: nat).(\lambda -(n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: C).(\forall (e2: -C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda -(c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 c2)))))))))).(\lambda -(c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n n0 p) c2 e2)).(\lambda -(e1: C).(\lambda (H1: (csubc g e1 e2)).(let H2 \def (match H0 in drop1 return -(\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p0 -c c0)).((eq PList p0 (PCons n n0 p)) \to ((eq C c c2) \to ((eq C c0 e2) \to -(ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc -g c1 c2)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList -PNil (PCons n n0 p))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c -e2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e in PList -return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) -\Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c2) \to ((eq -C c e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda -(c1: C).(csubc g c1 c2))))) H5)) H3 H4)))) | (drop1_cons c1 c0 h d H2 c3 hds0 -H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds0) (PCons n n0 -p))).(\lambda (H5: (eq C c1 c2)).(\lambda (H6: (eq C c3 e2)).((let H7 \def -(f_equal PList PList (\lambda (e: PList).(match e in PList return (\lambda -(_: PList).PList) with [PNil \Rightarrow hds0 | (PCons _ _ p0) \Rightarrow -p0])) (PCons h d hds0) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat -(\lambda (e: PList).(match e in PList return (\lambda (_: PList).nat) with -[PNil \Rightarrow d | (PCons _ n1 _) \Rightarrow n1])) (PCons h d hds0) -(PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: -PList).(match e in PList return (\lambda (_: PList).nat) with [PNil -\Rightarrow h | (PCons n1 _ _) \Rightarrow n1])) (PCons h d hds0) (PCons n n0 -p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds0 -p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n1 d c1 c0) \to ((drop1 -hds0 c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) -(\lambda (c4: C).(csubc g c4 c2)))))))))) (\lambda (H10: (eq nat d -n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds0 p) \to ((eq C c1 c2) -\to ((eq C c3 e2) \to ((drop n n1 c1 c0) \to ((drop1 hds0 c0 c3) \to (ex2 C -(\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c4 -c2))))))))) (\lambda (H11: (eq PList hds0 p)).(eq_ind PList p (\lambda (p0: -PList).((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n0 c1 c0) \to ((drop1 p0 -c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda -(c4: C).(csubc g c4 c2)))))))) (\lambda (H12: (eq C c1 c2)).(eq_ind C c2 -(\lambda (c: C).((eq C c3 e2) \to ((drop n n0 c c0) \to ((drop1 p c0 c3) \to -(ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc -g c4 c2))))))) (\lambda (H13: (eq C c3 e2)).(eq_ind C e2 (\lambda (c: -C).((drop n n0 c2 c0) \to ((drop1 p c0 c) \to (ex2 C (\lambda (c4: C).(drop1 -(PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c4 c2)))))) (\lambda (H14: -(drop n n0 c2 c0)).(\lambda (H15: (drop1 p c0 e2)).(let H_x \def (H c0 e2 H15 -e1 H1) in (let H16 \def H_x in (ex2_ind C (\lambda (c4: C).(drop1 p c4 e1)) -(\lambda (c4: C).(csubc g c4 c0)) (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 -p) c4 e1)) (\lambda (c4: C).(csubc g c4 c2))) (\lambda (x: C).(\lambda (H17: -(drop1 p x e1)).(\lambda (H18: (csubc g x c0)).(let H_x0 \def -(csubc_drop_conf_rev g c2 c0 n0 n H14 x H18) in (let H19 \def H_x0 in -(ex2_ind C (\lambda (c4: C).(drop n n0 c4 x)) (\lambda (c4: C).(csubc g c4 -c2)) (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: -C).(csubc g c4 c2))) (\lambda (x0: C).(\lambda (H20: (drop n n0 x0 -x)).(\lambda (H21: (csubc g x0 c2)).(ex_intro2 C (\lambda (c4: C).(drop1 -(PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c4 c2)) x0 (drop1_cons x0 x -n n0 H20 e1 p H17) H21)))) H19)))))) H16))))) c3 (sym_eq C c3 e2 H13))) c1 -(sym_eq C c1 c2 H12))) hds0 (sym_eq PList hds0 p H11))) d (sym_eq nat d n0 -H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal -PList (PCons n n0 p)) (refl_equal C c2) (refl_equal C e2)))))))))))) hds)). - -theorem drop1_ceqc_trans: - \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: -C).((drop1 hds c2 e2) \to (\forall (e1: C).((ceqc g e2 e1) \to (ex2 C -(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(ceqc g c2 c1))))))))) -\def - \lambda (g: G).(\lambda (hds: PList).(\lambda (c2: C).(\lambda (e2: -C).(\lambda (H: (drop1 hds c2 e2)).(\lambda (e1: C).(\lambda (H0: (ceqc g e2 -e1)).(let H1 \def H0 in (or_ind (csubc g e2 e1) (csubc g e1 e2) (ex2 C -(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(ceqc g c2 c1))) -(\lambda (H2: (csubc g e2 e1)).(let H_x \def (drop1_csubc_trans g hds c2 e2 H -e1 H2) in (let H3 \def H_x in (ex2_ind C (\lambda (c1: C).(drop1 hds c1 e1)) -(\lambda (c1: C).(csubc g c2 c1)) (ex2 C (\lambda (c1: C).(drop1 hds c1 e1)) -(\lambda (c1: C).(ceqc g c2 c1))) (\lambda (x: C).(\lambda (H4: (drop1 hds x -e1)).(\lambda (H5: (csubc g c2 x)).(ex_intro2 C (\lambda (c1: C).(drop1 hds -c1 e1)) (\lambda (c1: C).(ceqc g c2 c1)) x H4 (or_introl (csubc g c2 x) -(csubc g x c2) H5))))) H3)))) (\lambda (H2: (csubc g e1 e2)).(let H_x \def -(csubc_drop1_conf_rev g hds c2 e2 H e1 H2) in (let H3 \def H_x in (ex2_ind C -(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(csubc g c1 c2)) (ex2 C -(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(ceqc g c2 c1))) -(\lambda (x: C).(\lambda (H4: (drop1 hds x e1)).(\lambda (H5: (csubc g x -c2)).(ex_intro2 C (\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(ceqc -g c2 c1)) x H4 (or_intror (csubc g c2 x) (csubc g x c2) H5))))) H3)))) -H1)))))))). - -axiom sc3_ceqc_trans: - \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (c1: -C).(\forall (t: T).((sc3 g a c1 (THeads (Flat Appl) vs t)) \to (\forall (c2: -C).((ceqc g c2 c1) \to (sc3 g a c2 (THeads (Flat Appl) vs t))))))))) -. - diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/drop1.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/drop1.ma new file mode 100644 index 000000000..9c6355244 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/drop1.ma @@ -0,0 +1,198 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/drop1". + +include "csubc/drop.ma". + +theorem drop1_csubc_trans: + \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: +C).((drop1 hds c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C +(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(csubc g c2 c1))))))))) +\def + \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall +(c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 +e1) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 +c1))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 +e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e2 e1)).(let H1 \def (match H in +drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda +(_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 e2) \to +(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c2 +c1)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil +PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c e2)).(eq_ind C c2 +(\lambda (c0: C).((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 +e1)) (\lambda (c1: C).(csubc g c2 c1))))) (\lambda (H4: (eq C c2 e2)).(eq_ind +C e2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda +(c1: C).(csubc g c0 c1)))) (let H5 \def (eq_ind_r C e2 (\lambda (c0: +C).(csubc g c0 e1)) H0 c2 H4) in (eq_ind C c2 (\lambda (c0: C).(ex2 C +(\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c0 c1)))) +(ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g +c2 c1)) e1 (drop1_nil e1) H5) e2 H4)) c2 (sym_eq C c2 e2 H4))) c (sym_eq C c +c2 H2) H3)))) | (drop1_cons c1 c0 h d H1 c3 hds0 H2) \Rightarrow (\lambda +(H3: (eq PList (PCons h d hds0) PNil)).(\lambda (H4: (eq C c1 c2)).(\lambda +(H5: (eq C c3 e2)).((let H6 \def (eq_ind PList (PCons h d hds0) (\lambda (e: +PList).(match e in PList return (\lambda (_: PList).Prop) with [PNil +\Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in +(False_ind ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop h d c1 c0) \to ((drop1 +hds0 c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 PNil c4 e1)) (\lambda (c4: +C).(csubc g c2 c4))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList +PNil) (refl_equal C c2) (refl_equal C e2)))))))) (\lambda (n: nat).(\lambda +(n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: C).(\forall (e2: +C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda +(c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 c1)))))))))).(\lambda +(c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n n0 p) c2 e2)).(\lambda +(e1: C).(\lambda (H1: (csubc g e2 e1)).(let H2 \def (match H0 in drop1 return +(\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p0 +c c0)).((eq PList p0 (PCons n n0 p)) \to ((eq C c c2) \to ((eq C c0 e2) \to +(ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc +g c2 c1)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList +PNil (PCons n n0 p))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c +e2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e in PList +return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) +\Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c2) \to ((eq +C c e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda +(c1: C).(csubc g c2 c1))))) H5)) H3 H4)))) | (drop1_cons c1 c0 h d H2 c3 hds0 +H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds0) (PCons n n0 +p))).(\lambda (H5: (eq C c1 c2)).(\lambda (H6: (eq C c3 e2)).((let H7 \def +(f_equal PList PList (\lambda (e: PList).(match e in PList return (\lambda +(_: PList).PList) with [PNil \Rightarrow hds0 | (PCons _ _ p0) \Rightarrow +p0])) (PCons h d hds0) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat +(\lambda (e: PList).(match e in PList return (\lambda (_: PList).nat) with +[PNil \Rightarrow d | (PCons _ n1 _) \Rightarrow n1])) (PCons h d hds0) +(PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: +PList).(match e in PList return (\lambda (_: PList).nat) with [PNil +\Rightarrow h | (PCons n1 _ _) \Rightarrow n1])) (PCons h d hds0) (PCons n n0 +p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds0 +p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n1 d c1 c0) \to ((drop1 +hds0 c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) +(\lambda (c4: C).(csubc g c2 c4)))))))))) (\lambda (H10: (eq nat d +n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds0 p) \to ((eq C c1 c2) +\to ((eq C c3 e2) \to ((drop n n1 c1 c0) \to ((drop1 hds0 c0 c3) \to (ex2 C +(\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c2 +c4))))))))) (\lambda (H11: (eq PList hds0 p)).(eq_ind PList p (\lambda (p0: +PList).((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n0 c1 c0) \to ((drop1 p0 +c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda +(c4: C).(csubc g c2 c4)))))))) (\lambda (H12: (eq C c1 c2)).(eq_ind C c2 +(\lambda (c: C).((eq C c3 e2) \to ((drop n n0 c c0) \to ((drop1 p c0 c3) \to +(ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc +g c2 c4))))))) (\lambda (H13: (eq C c3 e2)).(eq_ind C e2 (\lambda (c: +C).((drop n n0 c2 c0) \to ((drop1 p c0 c) \to (ex2 C (\lambda (c4: C).(drop1 +(PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c2 c4)))))) (\lambda (H14: +(drop n n0 c2 c0)).(\lambda (H15: (drop1 p c0 e2)).(let H_x \def (H c0 e2 H15 +e1 H1) in (let H16 \def H_x in (ex2_ind C (\lambda (c4: C).(drop1 p c4 e1)) +(\lambda (c4: C).(csubc g c0 c4)) (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 +p) c4 e1)) (\lambda (c4: C).(csubc g c2 c4))) (\lambda (x: C).(\lambda (H17: +(drop1 p x e1)).(\lambda (H18: (csubc g c0 x)).(let H_x0 \def +(drop_csubc_trans g c2 c0 n0 n H14 x H18) in (let H19 \def H_x0 in (ex2_ind C +(\lambda (c4: C).(drop n n0 c4 x)) (\lambda (c4: C).(csubc g c2 c4)) (ex2 C +(\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c2 +c4))) (\lambda (x0: C).(\lambda (H20: (drop n n0 x0 x)).(\lambda (H21: (csubc +g c2 x0)).(ex_intro2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) +(\lambda (c4: C).(csubc g c2 c4)) x0 (drop1_cons x0 x n n0 H20 e1 p H17) +H21)))) H19)))))) H16))))) c3 (sym_eq C c3 e2 H13))) c1 (sym_eq C c1 c2 +H12))) hds0 (sym_eq PList hds0 p H11))) d (sym_eq nat d n0 H10))) h (sym_eq +nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n +n0 p)) (refl_equal C c2) (refl_equal C e2)))))))))))) hds)). + +theorem csubc_drop1_conf_rev: + \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: +C).((drop1 hds c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C +(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(csubc g c1 c2))))))))) +\def + \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall +(c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 +e2) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 +c2))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 +e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e1 e2)).(let H1 \def (match H in +drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda +(_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 e2) \to +(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 +c2)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil +PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c e2)).(eq_ind C c2 +(\lambda (c0: C).((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 +e1)) (\lambda (c1: C).(csubc g c1 c2))))) (\lambda (H4: (eq C c2 e2)).(eq_ind +C e2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda +(c1: C).(csubc g c1 c0)))) (let H5 \def (eq_ind_r C e2 (\lambda (c0: +C).(csubc g e1 c0)) H0 c2 H4) in (eq_ind C c2 (\lambda (c0: C).(ex2 C +(\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c0)))) +(ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g +c1 c2)) e1 (drop1_nil e1) H5) e2 H4)) c2 (sym_eq C c2 e2 H4))) c (sym_eq C c +c2 H2) H3)))) | (drop1_cons c1 c0 h d H1 c3 hds0 H2) \Rightarrow (\lambda +(H3: (eq PList (PCons h d hds0) PNil)).(\lambda (H4: (eq C c1 c2)).(\lambda +(H5: (eq C c3 e2)).((let H6 \def (eq_ind PList (PCons h d hds0) (\lambda (e: +PList).(match e in PList return (\lambda (_: PList).Prop) with [PNil +\Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in +(False_ind ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop h d c1 c0) \to ((drop1 +hds0 c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 PNil c4 e1)) (\lambda (c4: +C).(csubc g c4 c2))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList +PNil) (refl_equal C c2) (refl_equal C e2)))))))) (\lambda (n: nat).(\lambda +(n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: C).(\forall (e2: +C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda +(c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 c2)))))))))).(\lambda +(c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n n0 p) c2 e2)).(\lambda +(e1: C).(\lambda (H1: (csubc g e1 e2)).(let H2 \def (match H0 in drop1 return +(\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p0 +c c0)).((eq PList p0 (PCons n n0 p)) \to ((eq C c c2) \to ((eq C c0 e2) \to +(ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc +g c1 c2)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList +PNil (PCons n n0 p))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c +e2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e in PList +return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) +\Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c2) \to ((eq +C c e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda +(c1: C).(csubc g c1 c2))))) H5)) H3 H4)))) | (drop1_cons c1 c0 h d H2 c3 hds0 +H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds0) (PCons n n0 +p))).(\lambda (H5: (eq C c1 c2)).(\lambda (H6: (eq C c3 e2)).((let H7 \def +(f_equal PList PList (\lambda (e: PList).(match e in PList return (\lambda +(_: PList).PList) with [PNil \Rightarrow hds0 | (PCons _ _ p0) \Rightarrow +p0])) (PCons h d hds0) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat +(\lambda (e: PList).(match e in PList return (\lambda (_: PList).nat) with +[PNil \Rightarrow d | (PCons _ n1 _) \Rightarrow n1])) (PCons h d hds0) +(PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: +PList).(match e in PList return (\lambda (_: PList).nat) with [PNil +\Rightarrow h | (PCons n1 _ _) \Rightarrow n1])) (PCons h d hds0) (PCons n n0 +p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds0 +p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n1 d c1 c0) \to ((drop1 +hds0 c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) +(\lambda (c4: C).(csubc g c4 c2)))))))))) (\lambda (H10: (eq nat d +n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds0 p) \to ((eq C c1 c2) +\to ((eq C c3 e2) \to ((drop n n1 c1 c0) \to ((drop1 hds0 c0 c3) \to (ex2 C +(\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c4 +c2))))))))) (\lambda (H11: (eq PList hds0 p)).(eq_ind PList p (\lambda (p0: +PList).((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n0 c1 c0) \to ((drop1 p0 +c0 c3) \to (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda +(c4: C).(csubc g c4 c2)))))))) (\lambda (H12: (eq C c1 c2)).(eq_ind C c2 +(\lambda (c: C).((eq C c3 e2) \to ((drop n n0 c c0) \to ((drop1 p c0 c3) \to +(ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc +g c4 c2))))))) (\lambda (H13: (eq C c3 e2)).(eq_ind C e2 (\lambda (c: +C).((drop n n0 c2 c0) \to ((drop1 p c0 c) \to (ex2 C (\lambda (c4: C).(drop1 +(PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c4 c2)))))) (\lambda (H14: +(drop n n0 c2 c0)).(\lambda (H15: (drop1 p c0 e2)).(let H_x \def (H c0 e2 H15 +e1 H1) in (let H16 \def H_x in (ex2_ind C (\lambda (c4: C).(drop1 p c4 e1)) +(\lambda (c4: C).(csubc g c4 c0)) (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 +p) c4 e1)) (\lambda (c4: C).(csubc g c4 c2))) (\lambda (x: C).(\lambda (H17: +(drop1 p x e1)).(\lambda (H18: (csubc g x c0)).(let H_x0 \def +(csubc_drop_conf_rev g c2 c0 n0 n H14 x H18) in (let H19 \def H_x0 in +(ex2_ind C (\lambda (c4: C).(drop n n0 c4 x)) (\lambda (c4: C).(csubc g c4 +c2)) (ex2 C (\lambda (c4: C).(drop1 (PCons n n0 p) c4 e1)) (\lambda (c4: +C).(csubc g c4 c2))) (\lambda (x0: C).(\lambda (H20: (drop n n0 x0 +x)).(\lambda (H21: (csubc g x0 c2)).(ex_intro2 C (\lambda (c4: C).(drop1 +(PCons n n0 p) c4 e1)) (\lambda (c4: C).(csubc g c4 c2)) x0 (drop1_cons x0 x +n n0 H20 e1 p H17) H21)))) H19)))))) H16))))) c3 (sym_eq C c3 e2 H13))) c1 +(sym_eq C c1 c2 H12))) hds0 (sym_eq PList hds0 p H11))) d (sym_eq nat d n0 +H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal +PList (PCons n n0 p)) (refl_equal C c2) (refl_equal C e2)))))))))))) hds)). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/getl.ma new file mode 100644 index 000000000..6e07e138e --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/getl.ma @@ -0,0 +1,44 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/getl". + +include "csubc/drop.ma". + +include "csubc/clear.ma". + +theorem csubc_getl_conf: + \forall (g: G).(\forall (c1: C).(\forall (e1: C).(\forall (i: nat).((getl i +c1 e1) \to (\forall (c2: C).((csubc g c1 c2) \to (ex2 C (\lambda (e2: +C).(getl i c2 e2)) (\lambda (e2: C).(csubc g e1 e2))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (e1: C).(\lambda (i: nat).(\lambda +(H: (getl i c1 e1)).(\lambda (c2: C).(\lambda (H0: (csubc g c1 c2)).(let H1 +\def (getl_gen_all c1 e1 i H) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) +(\lambda (e: C).(clear e e1)) (ex2 C (\lambda (e2: C).(getl i c2 e2)) +(\lambda (e2: C).(csubc g e1 e2))) (\lambda (x: C).(\lambda (H2: (drop i O c1 +x)).(\lambda (H3: (clear x e1)).(let H_x \def (csubc_drop_conf_O g c1 x i H2 +c2 H0) in (let H4 \def H_x in (ex2_ind C (\lambda (e2: C).(drop i O c2 e2)) +(\lambda (e2: C).(csubc g x e2)) (ex2 C (\lambda (e2: C).(getl i c2 e2)) +(\lambda (e2: C).(csubc g e1 e2))) (\lambda (x0: C).(\lambda (H5: (drop i O +c2 x0)).(\lambda (H6: (csubc g x x0)).(let H_x0 \def (csubc_clear_conf g x e1 +H3 x0 H6) in (let H7 \def H_x0 in (ex2_ind C (\lambda (e2: C).(clear x0 e2)) +(\lambda (e2: C).(csubc g e1 e2)) (ex2 C (\lambda (e2: C).(getl i c2 e2)) +(\lambda (e2: C).(csubc g e1 e2))) (\lambda (x1: C).(\lambda (H8: (clear x0 +x1)).(\lambda (H9: (csubc g e1 x1)).(ex_intro2 C (\lambda (e2: C).(getl i c2 +e2)) (\lambda (e2: C).(csubc g e1 e2)) x1 (getl_intro i c2 x1 x0 H5 H8) +H9)))) H7)))))) H4)))))) H1)))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/props.ma new file mode 100644 index 000000000..84fa2ec98 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/props.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubc/props". + +include "csubc/defs.ma". + +include "sc3/props.ma". + +theorem csubc_refl: + \forall (g: G).(\forall (c: C).(csubc g c c)) +\def + \lambda (g: G).(\lambda (c: C).(C_ind (\lambda (c0: C).(csubc g c0 c0)) +(\lambda (n: nat).(csubc_sort g n)) (\lambda (c0: C).(\lambda (H: (csubc g c0 +c0)).(\lambda (k: K).(\lambda (t: T).(csubc_head g c0 c0 H k t))))) c)). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/defs.ma index 00a6abca1..c4950fb62 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/defs.ma @@ -18,7 +18,7 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/defs". include "csubst0/defs.ma". -inductive csubst1 (i:nat) (v:T) (c1:C): C \to Prop \def +inductive csubst1 (i: nat) (v: T) (c1: C): C \to Prop \def | csubst1_refl: csubst1 i v c1 c1 | csubst1_sing: \forall (c2: C).((csubst0 i v c1 c2) \to (csubst1 i v c1 c2)). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/clear.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/clear.ma similarity index 71% rename from matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/clear.ma rename to matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/clear.ma index 86b43ab7b..845371e0f 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/clear.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/clear.ma @@ -14,59 +14,59 @@ (* This file was automatically generated: do not edit *********************) -set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/clear". +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/clear". -include "csub3/defs.ma". +include "csubt/defs.ma". include "clear/fwd.ma". -theorem csub3_clear_conf: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to -(\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) +theorem csubt_clear_conf: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to +(\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear c2 e2)))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csub3 g c1 -c2)).(csub3_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear c -e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c0 + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 +c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear c +e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear c0 e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) -e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) +e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: -C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 -e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 +C).(\lambda (H0: (csubt g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 +e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: (clear (CHead c3 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c3 k0 u) -e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear +e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear (CHead c4 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c3 (Bind b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda -(e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) -(ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind b) u) e2)) (\lambda -(e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csub3_head g +(e2: C).(csubt g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) +(ex_intro2 C (\lambda (e2: C).(csubt g (CHead c3 (Bind b) u) e2)) (\lambda +(e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csubt_head g c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) e1 (clear_gen_bind b c3 e1 u H3)))) (\lambda (f: F).(\lambda (H3: (clear (CHead c3 (Flat f) u) e1)).(let H4 \def -(H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csub3 g -e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csub3 g e1 +(H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csubt g +e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: -C).(\lambda (H5: (csub3 g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C -(\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) +C).(\lambda (H5: (csubt g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C +(\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2)) x H5 (clear_flat c4 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: -C).(\lambda (c4: C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (_: ((\forall -(e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda +C).(\lambda (c4: C).(\lambda (H0: (csubt g c3 c4)).(\lambda (_: ((\forall +(e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (b: B).(\lambda (H2: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (e1: C).(\lambda (H3: (clear (CHead c3 (Bind Void) u1) e1)).(eq_ind_r C (CHead c3 (Bind Void) u1) -(\lambda (c: C).(ex2 C (\lambda (e2: C).(csub3 g c e2)) (\lambda (e2: -C).(clear (CHead c4 (Bind b) u2) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 +(\lambda (c: C).(ex2 C (\lambda (e2: C).(csubt g c e2)) (\lambda (e2: +C).(clear (CHead c4 (Bind b) u2) e2)))) (ex_intro2 C (\lambda (e2: C).(csubt g (CHead c3 (Bind Void) u1) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) -u2) e2)) (CHead c4 (Bind b) u2) (csub3_void g c3 c4 H0 b H2 u1 u2) +u2) e2)) (CHead c4 (Bind b) u2) (csubt_void g c3 c4 H0 b H2 u1 u2) (clear_bind b c4 u2)) e1 (clear_gen_bind Void c3 e1 u1 H3)))))))))))) -(\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (_: -((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) +(\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csubt g c3 c4)).(\lambda (_: +((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H2: (ty3 g c4 u t)).(\lambda (e1: C).(\lambda (H3: (clear (CHead c3 (Bind Abst) t) e1)).(eq_ind_r C (CHead c3 (Bind Abst) t) (\lambda (c: C).(ex2 C -(\lambda (e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind -Abbr) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind Abst) +(\lambda (e2: C).(csubt g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind +Abbr) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csubt g (CHead c3 (Bind Abst) t) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)) (CHead c4 (Bind -Abbr) u) (csub3_abst g c3 c4 H0 u t H2) (clear_bind Abbr c4 u)) e1 +Abbr) u) (csubt_abst g c3 c4 H0 u t H2) (clear_bind Abbr c4 u)) e1 (clear_gen_bind Abst c3 e1 t H3))))))))))) c1 c2 H)))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/defs.ma similarity index 75% rename from matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/defs.ma rename to matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/defs.ma index df8b56ada..bbdaaae50 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/defs.ma @@ -14,18 +14,18 @@ (* This file was automatically generated: do not edit *********************) -set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/defs". +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/defs". include "ty3/defs.ma". -inductive csub3 (g:G): C \to (C \to Prop) \def -| csub3_sort: \forall (n: nat).(csub3 g (CSort n) (CSort n)) -| csub3_head: \forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall -(k: K).(\forall (u: T).(csub3 g (CHead c1 k u) (CHead c2 k u)))))) -| csub3_void: \forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall -(b: B).((not (eq B b Void)) \to (\forall (u1: T).(\forall (u2: T).(csub3 g +inductive csubt (g: G): C \to (C \to Prop) \def +| csubt_sort: \forall (n: nat).(csubt g (CSort n) (CSort n)) +| csubt_head: \forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall +(k: K).(\forall (u: T).(csubt g (CHead c1 k u) (CHead c2 k u)))))) +| csubt_void: \forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall +(b: B).((not (eq B b Void)) \to (\forall (u1: T).(\forall (u2: T).(csubt g (CHead c1 (Bind Void) u1) (CHead c2 (Bind b) u2)))))))) -| csub3_abst: \forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall -(u: T).(\forall (t: T).((ty3 g c2 u t) \to (csub3 g (CHead c1 (Bind Abst) t) +| csubt_abst: \forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall +(u: T).(\forall (t: T).((ty3 g c2 u t) \to (csubt g (CHead c1 (Bind Abst) t) (CHead c2 (Bind Abbr) u))))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/drop.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/drop.ma similarity index 74% rename from matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/drop.ma rename to matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/drop.ma index 59141ad9c..c6216627e 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/drop.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/drop.ma @@ -14,36 +14,36 @@ (* This file was automatically generated: do not edit *********************) -set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/drop". +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/drop". -include "csub3/defs.ma". +include "csubt/defs.ma". include "drop/fwd.ma". -theorem csub3_drop_flat: +theorem csubt_drop_flat: \forall (g: G).(\forall (f: F).(\forall (n: nat).(\forall (c1: C).(\forall -(c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n O c1 -(CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +(c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n O c1 +(CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Flat f) u)))))))))))) \def \lambda (g: G).(\lambda (f: F).(\lambda (n: nat).(nat_ind (\lambda (n0: -nat).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: +nat).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda -(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Flat f) -u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csub3 g c1 +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Flat f) +u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 -(Flat f) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csub3 g c c2)) H +(Flat f) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c2)) H (CHead d1 (Flat f) u) (drop_gen_refl c1 (CHead d1 (Flat f) u) H0)) in (let H2 -\def (match H1 in csub3 return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: -(csub3 ? c c0)).((eq C c (CHead d1 (Flat f) u)) \to ((eq C c0 c2) \to (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 -(Flat f) u))))))))) with [(csub3_sort n0) \Rightarrow (\lambda (H2: (eq C +\def (match H1 in csubt return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: +(csubt ? c c0)).((eq C c (CHead d1 (Flat f) u)) \to ((eq C c0 c2) \to (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 +(Flat f) u))))))))) with [(csubt_sort n0) \Rightarrow (\lambda (H2: (eq C (CSort n0) (CHead d1 (Flat f) u))).(\lambda (H3: (eq C (CSort n0) c2)).((let H4 \def (eq_ind C (CSort n0) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Flat f) u) H2) in (False_ind ((eq C (CSort n0) c2) \to -(ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead -d2 (Flat f) u))))) H4)) H3))) | (csub3_head c0 c3 H2 k u0) \Rightarrow +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead +d2 (Flat f) u))))) H4)) H3))) | (csubt_head c0 c3 H2 k u0) \Rightarrow (\lambda (H3: (eq C (CHead c0 k u0) (CHead d1 (Flat f) u))).(\lambda (H4: (eq C (CHead c3 k u0) c2)).((let H5 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) @@ -54,53 +54,53 @@ C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k u0) (CHead d1 (Flat f) u) H3) in (eq_ind C d1 (\lambda (c: C).((eq K k (Flat f)) \to ((eq T u0 u) \to ((eq C -(CHead c3 k u0) c2) \to ((csub3 g c c3) \to (ex2 C (\lambda (d2: C).(csub3 g +(CHead c3 k u0) c2) \to ((csubt g c c3) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))))) (\lambda (H8: (eq K k (Flat f))).(eq_ind K (Flat f) (\lambda (k0: K).((eq T u0 u) \to -((eq C (CHead c3 k0 u0) c2) \to ((csub3 g d1 c3) \to (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) +((eq C (CHead c3 k0 u0) c2) \to ((csubt g d1 c3) \to (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u)))))))) (\lambda (H9: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C -(CHead c3 (Flat f) t) c2) \to ((csub3 g d1 c3) \to (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) +(CHead c3 (Flat f) t) c2) \to ((csubt g d1 c3) \to (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) (\lambda (H10: (eq C (CHead c3 (Flat f) u) c2)).(eq_ind C (CHead c3 (Flat f) -u) (\lambda (c: C).((csub3 g d1 c3) \to (ex2 C (\lambda (d2: C).(csub3 g d1 +u) (\lambda (c: C).((csubt g d1 c3) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Flat f) u)))))) (\lambda (H11: -(csub3 g d1 c3)).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +(csubt g d1 c3)).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Flat f) u) (CHead d2 (Flat f) u))) c3 H11 (drop_refl (CHead c3 (Flat f) u)))) c2 H10)) u0 (sym_eq T u0 u H9))) k (sym_eq K k (Flat -f) H8))) c0 (sym_eq C c0 d1 H7))) H6)) H5)) H4 H2))) | (csub3_void c0 c3 H2 b +f) H8))) c0 (sym_eq C c0 d1 H7))) H6)) H5)) H4 H2))) | (csubt_void c0 c3 H2 b H3 u1 u2) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind Void) u1) (CHead d1 (Flat f) u))).(\lambda (H5: (eq C (CHead c3 (Bind b) u2) c2)).((let H6 \def (eq_ind C (CHead c0 (Bind Void) u1) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u) -H4) in (False_ind ((eq C (CHead c3 (Bind b) u2) c2) \to ((csub3 g c0 c3) \to -((not (eq B b Void)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +H4) in (False_ind ((eq C (CHead c3 (Bind b) u2) c2) \to ((csubt g c0 c3) \to +((not (eq B b Void)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) H6)) H5 H2 H3))) | -(csub3_abst c0 c3 H2 u0 t H3) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind +(csubt_abst c0 c3 H2 u0 t H3) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind Abst) t) (CHead d1 (Flat f) u))).(\lambda (H5: (eq C (CHead c3 (Bind Abbr) u0) c2)).((let H6 \def (eq_ind C (CHead c0 (Bind Abst) t) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u) H4) in (False_ind ((eq C (CHead c3 (Bind Abbr) u0) c2) \to -((csub3 g c0 c3) \to ((ty3 g c3 u0 t) \to (ex2 C (\lambda (d2: C).(csub3 g d1 +((csubt g c0 c3) \to ((ty3 g c3 u0 t) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) H6)) H5 H2 H3)))]) in (H2 (refl_equal C (CHead d1 (Flat f) u)) (refl_equal C c2)))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: -C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 -(CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 +(CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Flat f) u)))))))))))).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (H0: (csub3 g c1 c2)).(csub3_ind g (\lambda (c: +C).(\lambda (c2: C).(\lambda (H0: (csubt g c1 c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (u: T).((drop (S n0) O c (CHead -d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Flat f) u))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Flat f) u))).(let H2 \def (match H1 in drop return (\lambda (n2: nat).(\lambda (n3: nat).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop n2 n3 c c0)).((eq nat n2 (S n0)) \to ((eq nat n3 O) \to ((eq C c (CSort n1)) -\to ((eq C c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 +\to ((eq C c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))))))))) with [(drop_refl c) \Rightarrow (\lambda (H2: (eq nat O (S n0))).(\lambda (H3: (eq nat O O)).(\lambda (H4: (eq C c (CSort n1))).(\lambda @@ -108,7 +108,7 @@ n0))).(\lambda (H3: (eq nat O O)).(\lambda (H4: (eq C c (CSort n1))).(\lambda nat).(match e in nat return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n0) H2) in (False_ind ((eq nat O O) \to ((eq C c (CSort n1)) \to ((eq C c (CHead d1 (Flat f) u)) \to (ex2 C (\lambda -(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))) H6)) H3 H4 H5))))) | (drop_drop k h c e H2 u0) \Rightarrow (\lambda (H3: (eq nat (S h) (S n0))).(\lambda (H4: (eq nat O O)).(\lambda (H5: (eq C (CHead c k u0) (CSort n1))).(\lambda (H6: (eq C e (CHead d1 (Flat @@ -116,13 +116,13 @@ f) u))).((let H7 \def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O \Rightarrow h | (S n2) \Rightarrow n2])) (S h) (S n0) H3) in (eq_ind nat n0 (\lambda (n2: nat).((eq nat O O) \to ((eq C (CHead c k u0) (CSort n1)) \to ((eq C e (CHead d1 (Flat f) u)) \to -((drop (r k n2) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +((drop (r k n2) O c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))))) (\lambda (_: (eq nat O O)).(\lambda (H9: (eq C (CHead c k u0) (CSort n1))).(let H10 \def (eq_ind C (CHead c k u0) (\lambda (e0: C).(match e0 in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n1) H9) in (False_ind ((eq C e (CHead d1 (Flat f) u)) \to -((drop (r k n0) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +((drop (r k n0) O c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u)))))) H10)))) h (sym_eq nat h n0 H7))) H4 H5 H6 H2))))) | (drop_skip k h d c e H2 u0) \Rightarrow (\lambda (H3: (eq nat h (S n0))).(\lambda (H4: (eq nat (S d) @@ -130,96 +130,96 @@ O)).(\lambda (H5: (eq C (CHead c k (lift h (r k d) u0)) (CSort n1))).(\lambda (H6: (eq C (CHead e k u0) (CHead d1 (Flat f) u))).(eq_ind nat (S n0) (\lambda (n2: nat).((eq nat (S d) O) \to ((eq C (CHead c k (lift n2 (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Flat f) u)) \to ((drop n2 (r -k d) c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop +k d) c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))))) (\lambda (H7: (eq nat (S d) O)).(let H8 \def (eq_ind nat (S d) (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind ((eq C (CHead c k (lift (S n0) (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Flat f) u)) \to ((drop (S n0) (r k d) c -e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) +e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))) H8))) h (sym_eq nat h (S n0) H3) H4 H5 H6 H2)))))]) in (H2 (refl_equal nat (S n0)) (refl_equal nat O) (refl_equal C (CSort n1)) (refl_equal C (CHead d1 (Flat f) u)))))))) (\lambda (c0: -C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (H2: ((\forall +C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (u0: T).((drop (S n0) O (CHead c0 k0 u) (CHead -d1 (Flat f) u0)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +d1 (Flat f) u0)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Flat f) u0))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u0))) -(ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O +C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u0))) +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: -(csub3 g d1 x)).(\lambda (H5: (drop n0 O c3 (CHead x (Flat f) -u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop +(csubt g d1 x)).(\lambda (H5: (drop n0 O c3 (CHead x (Flat f) +u0))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Bind b) n0 c3 (CHead x (Flat f) u0) H5 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind b) c0 (CHead d1 (Flat f) u0) u n0 H3)))))))) (\lambda (f0: F).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead -c0 (Flat f0) u) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g +c0 (Flat f0) u) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u0))) (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -(Flat f0) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csub3 g +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(Flat f0) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g d1 x)).(\lambda (H5: (drop (S n0) O c3 (CHead x (Flat f) u0))).(ex_intro2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f0) u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Flat f0) n0 c3 (CHead x (Flat f) u0) H5 u))))) (H2 d1 u0 (drop_gen_drop (Flat f0) c0 (CHead d1 (Flat f) u0) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: -C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: +C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Flat f) u))).(ex2_ind C (\lambda -(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) -u))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) +u))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Flat f) u)))) (\lambda (x: C).(\lambda (H5: -(csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Flat f) u))).(ex_intro2 -C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(csubt g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Flat f) u))).(ex_intro2 +C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Flat f) u))) x H5 (drop_drop (Bind b) n0 c3 (CHead x (Flat f) u) H6 u2))))) (H c0 c3 H1 d1 u (drop_gen_drop (Bind Void) c0 (CHead d1 (Flat f) u) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: -C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: +C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H4: (drop (S n0) O (CHead c0 -(Bind Abst) t) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g +(Bind Abst) t) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u0))) (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -(Bind Abbr) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H5: (csub3 +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(Bind Abbr) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H5: (csubt g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Flat f) u0))).(ex_intro2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Flat f) u0))) x H5 (drop_drop (Bind Abbr) n0 c3 (CHead x (Flat f) u0) H6 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind Abst) c0 (CHead d1 (Flat f) u0) t n0 H4))))))))))))) c1 c2 H0)))))) n))). -theorem csub3_drop_abbr: - \forall (g: G).(\forall (n: nat).(\forall (c1: C).(\forall (c2: C).((csub3 g +theorem csubt_drop_abbr: + \forall (g: G).(\forall (n: nat).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind -Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop +Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))))))))))) \def \lambda (g: G).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: -C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: +C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) -u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csub3 g c1 +C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) +u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 -(Bind Abbr) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csub3 g c c2)) H +(Bind Abbr) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c2)) H (CHead d1 (Bind Abbr) u) (drop_gen_refl c1 (CHead d1 (Bind Abbr) u) H0)) in -(let H2 \def (match H1 in csub3 return (\lambda (c: C).(\lambda (c0: -C).(\lambda (_: (csub3 ? c c0)).((eq C c (CHead d1 (Bind Abbr) u)) \to ((eq C -c0 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O -O c2 (CHead d2 (Bind Abbr) u))))))))) with [(csub3_sort n0) \Rightarrow +(let H2 \def (match H1 in csubt return (\lambda (c: C).(\lambda (c0: +C).(\lambda (_: (csubt ? c c0)).((eq C c (CHead d1 (Bind Abbr) u)) \to ((eq C +c0 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O +O c2 (CHead d2 (Bind Abbr) u))))))))) with [(csubt_sort n0) \Rightarrow (\lambda (H2: (eq C (CSort n0) (CHead d1 (Bind Abbr) u))).(\lambda (H3: (eq C (CSort n0) c2)).((let H4 \def (eq_ind C (CSort n0) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abbr) u) H2) in (False_ind ((eq C -(CSort n0) c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: -C).(drop O O c2 (CHead d2 (Bind Abbr) u))))) H4)) H3))) | (csub3_head c0 c3 +(CSort n0) c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop O O c2 (CHead d2 (Bind Abbr) u))))) H4)) H3))) | (csubt_head c0 c3 H2 k u0) \Rightarrow (\lambda (H3: (eq C (CHead c0 k u0) (CHead d1 (Bind Abbr) u))).(\lambda (H4: (eq C (CHead c3 k u0) c2)).((let H5 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) @@ -230,23 +230,23 @@ C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k u0) (CHead d1 (Bind Abbr) u) H3) in (eq_ind C d1 (\lambda (c: C).((eq K k -(Bind Abbr)) \to ((eq T u0 u) \to ((eq C (CHead c3 k u0) c2) \to ((csub3 g c -c3) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O +(Bind Abbr)) \to ((eq T u0 u) \to ((eq C (CHead c3 k u0) c2) \to ((csubt g c +c3) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (H8: (eq K k (Bind Abbr))).(eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u0 u) \to ((eq C (CHead -c3 k0 u0) c2) \to ((csub3 g d1 c3) \to (ex2 C (\lambda (d2: C).(csub3 g d1 +c3 k0 u0) c2) \to ((csubt g d1 c3) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u)))))))) (\lambda (H9: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c3 (Bind Abbr) t) -c2) \to ((csub3 g d1 c3) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +c2) \to ((csubt g d1 c3) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))) (\lambda (H10: (eq C (CHead c3 (Bind Abbr) u) c2)).(eq_ind C (CHead c3 (Bind Abbr) u) -(\lambda (c: C).((csub3 g d1 c3) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(\lambda (c: C).((csubt g d1 c3) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abbr) u)))))) (\lambda (H11: -(csub3 g d1 c3)).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +(csubt g d1 c3)).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) c3 H11 (drop_refl (CHead c3 (Bind Abbr) u)))) c2 H10)) u0 (sym_eq T u0 u H9))) k (sym_eq K k (Bind Abbr) H8))) c0 (sym_eq C c0 d1 H7))) H6)) H5)) H4 H2))) | -(csub3_void c0 c3 H2 b H3 u1 u2) \Rightarrow (\lambda (H4: (eq C (CHead c0 +(csubt_void c0 c3 H2 b H3 u1 u2) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind Void) u1) (CHead d1 (Bind Abbr) u))).(\lambda (H5: (eq C (CHead c3 (Bind b) u2) c2)).((let H6 \def (eq_ind C (CHead c0 (Bind Void) u1) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow @@ -254,9 +254,9 @@ False | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind b0) \Rightarrow (match b0 in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H4) in (False_ind -((eq C (CHead c3 (Bind b) u2) c2) \to ((csub3 g c0 c3) \to ((not (eq B b -Void)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O -O c2 (CHead d2 (Bind Abbr) u))))))) H6)) H5 H2 H3))) | (csub3_abst c0 c3 H2 +((eq C (CHead c3 (Bind b) u2) c2) \to ((csubt g c0 c3) \to ((not (eq B b +Void)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O +O c2 (CHead d2 (Bind Abbr) u))))))) H6)) H5 H2 H3))) | (csubt_abst c0 c3 H2 u0 t H3) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind Abst) t) (CHead d1 (Bind Abbr) u))).(\lambda (H5: (eq C (CHead c3 (Bind Abbr) u0) c2)).((let H6 \def (eq_ind C (CHead c0 (Bind Abst) t) (\lambda (e: C).(match e in C return @@ -265,30 +265,30 @@ u0 t H3) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind Abst) t) (CHead d1 \Rightarrow (match b in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H4) in (False_ind ((eq C -(CHead c3 (Bind Abbr) u0) c2) \to ((csub3 g c0 c3) \to ((ty3 g c3 u0 t) \to -(ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead +(CHead c3 (Bind Abbr) u0) c2) \to ((csubt g c0 c3) \to ((ty3 g c3 u0 t) \to +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))) H6)) H5 H2 H3)))]) in (H2 (refl_equal C (CHead d1 (Bind Abbr) u)) (refl_equal C c2)))))))))) (\lambda (n0: nat).(\lambda (H: -((\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: +((\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: -(csub3 g c1 c2)).(csub3_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (d1: +(csubt g c1 c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (u: T).((drop (S n0) O c (CHead d1 (Bind Abbr) u)) \to (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Bind Abbr) u))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Bind Abbr) u))).(let H2 \def (match H1 in drop return (\lambda (n2: nat).(\lambda (n3: nat).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop n2 n3 c c0)).((eq nat n2 (S n0)) \to ((eq nat n3 O) \to ((eq C c (CSort n1)) \to ((eq C c0 (CHead d1 (Bind -Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop +Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))))))) with [(drop_refl c) \Rightarrow (\lambda (H2: (eq nat O (S n0))).(\lambda (H3: (eq nat O O)).(\lambda (H4: (eq C c (CSort n1))).(\lambda (H5: (eq C c (CHead d1 (Bind Abbr) u))).((let H6 \def (eq_ind nat O (\lambda (e: nat).(match e in nat return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n0) H2) in (False_ind ((eq nat O O) \to ((eq C c (CSort n1)) -\to ((eq C c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g +\to ((eq C c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))) H6)) H3 H4 H5))))) | (drop_drop k h c e H2 u0) \Rightarrow (\lambda (H3: (eq nat (S h) (S n0))).(\lambda (H4: (eq nat O O)).(\lambda (H5: (eq C @@ -297,13 +297,13 @@ u))).((let H7 \def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O \Rightarrow h | (S n2) \Rightarrow n2])) (S h) (S n0) H3) in (eq_ind nat n0 (\lambda (n2: nat).((eq nat O O) \to ((eq C (CHead c k u0) (CSort n1)) \to ((eq C e (CHead d1 (Bind Abbr) u)) \to -((drop (r k n2) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +((drop (r k n2) O c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))) (\lambda (_: (eq nat O O)).(\lambda (H9: (eq C (CHead c k u0) (CSort n1))).(let H10 \def (eq_ind C (CHead c k u0) (\lambda (e0: C).(match e0 in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n1) H9) in (False_ind ((eq C e (CHead d1 (Bind Abbr) u)) \to -((drop (r k n0) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +((drop (r k n0) O c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))))) H10)))) h (sym_eq nat h n0 H7))) H4 H5 H6 H2))))) | (drop_skip k h d c e H2 u0) \Rightarrow (\lambda (H3: (eq nat h (S n0))).(\lambda (H4: (eq nat (S d) @@ -311,110 +311,110 @@ O)).(\lambda (H5: (eq C (CHead c k (lift h (r k d) u0)) (CSort n1))).(\lambda (H6: (eq C (CHead e k u0) (CHead d1 (Bind Abbr) u))).(eq_ind nat (S n0) (\lambda (n2: nat).((eq nat (S d) O) \to ((eq C (CHead c k (lift n2 (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Bind Abbr) u)) \to -((drop n2 (r k d) c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +((drop n2 (r k d) c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))) (\lambda (H7: (eq nat (S d) O)).(let H8 \def (eq_ind nat (S d) (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind ((eq C (CHead c k (lift (S n0) (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Bind Abbr) u)) \to ((drop (S n0) (r k d) c e) \to (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))) H8))) h (sym_eq nat h (S n0) H3) H4 H5 H6 H2)))))]) in (H2 (refl_equal nat (S n0)) (refl_equal nat O) (refl_equal C (CSort n1)) (refl_equal C (CHead d1 (Bind Abbr) u)))))))) (\lambda (c0: C).(\lambda (c3: -C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall +C).(\lambda (H1: (csubt g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (u0: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Bind -Abbr) u0)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +Abbr) u0)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abbr) u0))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Bind Abbr) u0))).(ex2_ind C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 -(Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 +(Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda -(x: C).(\lambda (H4: (csub3 g d1 x)).(\lambda (H5: (drop n0 O c3 (CHead x -(Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +(x: C).(\lambda (H4: (csubt g d1 x)).(\lambda (H5: (drop n0 O c3 (CHead x +(Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0))) x H4 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abbr) u0) H5 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind b) c0 (CHead d1 (Bind Abbr) u0) u n0 H3)))))))) (\lambda (f: F).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f) u) (CHead d1 (Bind Abbr) -u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S -n0) O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S +n0) O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) -u0)))) (\lambda (x: C).(\lambda (H4: (csub3 g d1 x)).(\lambda (H5: (drop (S -n0) O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 +u0)))) (\lambda (x: C).(\lambda (H4: (csubt g d1 x)).(\lambda (H5: (drop (S +n0) O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0))) x H4 (drop_drop (Flat f) n0 c3 (CHead x (Bind Abbr) u0) H5 u))))) (H2 d1 u0 (drop_gen_drop (Flat f) c0 (CHead d1 (Bind Abbr) u0) u n0 -H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g +H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 -(CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H4: (drop (S n0) O (CHead c0 -(Bind Void) u1) (CHead d1 (Bind Abbr) u))).(ex2_ind C (\lambda (d2: C).(csub3 +(Bind Void) u1) (CHead d1 (Bind Abbr) u))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abbr) u))) (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -(Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (x: C).(\lambda (H5: (csub3 +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (x: C).(\lambda (H5: (csubt g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Bind Abbr) u))).(ex_intro2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u))) x H5 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abbr) u) H6 u2))))) (H c0 c3 H1 d1 u (drop_gen_drop (Bind Void) c0 (CHead d1 (Bind Abbr) u) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda -(c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: +(c3: C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Bind Abbr) u0))).(ex2_ind C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abbr) -u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) +C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abbr) +u0))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (x: -C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Bind -Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +C).(\lambda (H5: (csubt g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Bind +Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0))) x H5 (drop_drop (Bind Abbr) n0 c3 (CHead x (Bind Abbr) u0) H6 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind Abst) c0 (CHead d1 (Bind Abbr) u0) t n0 H4))))))))))))) c1 c2 H0)))))) n)). -theorem csub3_drop_abst: - \forall (g: G).(\forall (n: nat).(\forall (c1: C).(\forall (c2: C).((csub3 g +theorem csubt_drop_abst: + \forall (g: G).(\forall (n: nat).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (t: T).((drop n O c1 (CHead d1 (Bind -Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))) \def \lambda (g: G).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: -C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (t: +C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (t: T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abst) -t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abst) +t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))) (\lambda (c1: C).(\lambda -(c2: C).(\lambda (H: (csub3 g c1 c2)).(\lambda (d1: C).(\lambda (t: +(c2: C).(\lambda (H: (csubt g c1 c2)).(\lambda (d1: C).(\lambda (t: T).(\lambda (H0: (drop O O c1 (CHead d1 (Bind Abst) t))).(let H1 \def (eq_ind -C c1 (\lambda (c: C).(csub3 g c c2)) H (CHead d1 (Bind Abst) t) +C c1 (\lambda (c: C).(csubt g c c2)) H (CHead d1 (Bind Abst) t) (drop_gen_refl c1 (CHead d1 (Bind Abst) t) H0)) in (let H2 \def (match H1 in -csub3 return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csub3 ? c +csubt return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csubt ? c c0)).((eq C c (CHead d1 (Bind Abst) t)) \to ((eq C c0 c2) \to (or (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 +(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) with -[(csub3_sort n0) \Rightarrow (\lambda (H2: (eq C (CSort n0) (CHead d1 (Bind +[(csubt_sort n0) \Rightarrow (\lambda (H2: (eq C (CSort n0) (CHead d1 (Bind Abst) t))).(\lambda (H3: (eq C (CSort n0) c2)).((let H4 \def (eq_ind C (CSort n0) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abst) t) H2) in (False_ind ((eq C (CSort n0) c2) \to (or (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) -(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) +(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t)))))) H4)) H3))) | (csub3_head c0 c3 H2 k u) +C).(\lambda (u: T).(ty3 g d2 u t)))))) H4)) H3))) | (csubt_head c0 c3 H2 k u) \Rightarrow (\lambda (H3: (eq C (CHead c0 k u) (CHead d1 (Bind Abst) t))).(\lambda (H4: (eq C (CHead c3 k u) c2)).((let H5 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) @@ -425,37 +425,37 @@ C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k u) (CHead d1 (Bind Abst) t) H3) in (eq_ind C d1 (\lambda (c: C).((eq K k -(Bind Abst)) \to ((eq T u t) \to ((eq C (CHead c3 k u) c2) \to ((csub3 g c -c3) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O +(Bind Abst)) \to ((eq T u t) \to ((eq C (CHead c3 k u) c2) \to ((csubt g c +c3) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (H8: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) (\lambda (k0: -K).((eq T u t) \to ((eq C (CHead c3 k0 u) c2) \to ((csub3 g d1 c3) \to (or -(ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead -d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +K).((eq T u t) \to ((eq C (CHead c3 k0 u) c2) \to ((csubt g d1 c3) \to (or +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead +d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))))) (\lambda (H9: (eq T u t)).(eq_ind T t (\lambda (t0: T).((eq C (CHead c3 (Bind Abst) -t0) c2) \to ((csub3 g d1 c3) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +t0) c2) \to ((csubt g d1 c3) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda -(d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) (\lambda (H10: (eq C (CHead c3 (Bind Abst) t) -c2)).(eq_ind C (CHead c3 (Bind Abst) t) (\lambda (c: C).((csub3 g d1 c3) \to -(or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c +c2)).(eq_ind C (CHead c3 (Bind Abst) t) (\lambda (c: C).((csubt g d1 c3) \to +(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c (CHead d2 +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))) -(\lambda (H11: (csub3 g d1 c3)).(or_introl (ex2 C (\lambda (d2: C).(csub3 g +(\lambda (H11: (csubt g d1 c3)).(or_introl (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abst) t) (CHead d2 (Bind -Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) +Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abst) t) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) -(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O +(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abst) t) (CHead d2 (Bind Abst) t))) c3 H11 (drop_refl (CHead c3 (Bind Abst) t))))) c2 H10)) u (sym_eq T u t H9))) k (sym_eq K k (Bind -Abst) H8))) c0 (sym_eq C c0 d1 H7))) H6)) H5)) H4 H2))) | (csub3_void c0 c3 +Abst) H8))) c0 (sym_eq C c0 d1 H7))) H6)) H5)) H4 H2))) | (csubt_void c0 c3 H2 b H3 u1 u2) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind Void) u1) (CHead d1 (Bind Abst) t))).(\lambda (H5: (eq C (CHead c3 (Bind b) u2) c2)).((let H6 \def (eq_ind C (CHead c0 (Bind Void) u1) (\lambda (e: C).(match @@ -464,12 +464,12 @@ e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | [(Bind b0) \Rightarrow (match b0 in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abst) t) H4) in (False_ind ((eq C -(CHead c3 (Bind b) u2) c2) \to ((csub3 g c0 c3) \to ((not (eq B b Void)) \to -(or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 +(CHead c3 (Bind b) u2) c2) \to ((csubt g c0 c3) \to ((not (eq B b Void)) \to +(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))) H6)) -H5 H2 H3))) | (csub3_abst c0 c3 H2 u t0 H3) \Rightarrow (\lambda (H4: (eq C +H5 H2 H3))) | (csubt_abst c0 c3 H2 u t0 H3) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind Abst) t0) (CHead d1 (Bind Abst) t))).(\lambda (H5: (eq C (CHead c3 (Bind Abbr) u) c2)).((let H6 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow t0 | @@ -478,54 +478,54 @@ Abst) t) H4) in ((let H7 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 (Bind Abst) t0) (CHead d1 (Bind Abst) t) H4) in (eq_ind C d1 (\lambda (c: C).((eq T t0 t) \to ((eq C (CHead c3 (Bind Abbr) u) -c2) \to ((csub3 g c c3) \to ((ty3 g c3 u t0) \to (or (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) -(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +c2) \to ((csubt g c c3) \to ((ty3 g c3 u t0) \to (or (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) +(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (H8: (eq T t0 t)).(eq_ind T t (\lambda (t1: T).((eq C (CHead c3 (Bind Abbr) u) c2) \to -((csub3 g d1 c3) \to ((ty3 g c3 u t1) \to (or (ex2 C (\lambda (d2: C).(csub3 +((csubt g d1 c3) \to ((ty3 g c3 u t1) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C -T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))))) (\lambda (H9: (eq C (CHead c3 (Bind Abbr) u) c2)).(eq_ind C (CHead c3 (Bind Abbr) u) (\lambda (c: -C).((csub3 g d1 c3) \to ((ty3 g c3 u t) \to (or (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) t)))) -(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +C).((csubt g d1 c3) \to ((ty3 g c3 u t) \to (or (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) t)))) +(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) (\lambda (H10: (csub3 g d1 -c3)).(\lambda (H11: (ty3 g c3 u t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 +C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) (\lambda (H10: (csubt g d1 +c3)).(\lambda (H11: (ty3 g c3 u t)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind -Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) +Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) -(ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +(ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) c3 u H10 (drop_refl (CHead c3 (Bind Abbr) u)) H11)))) c2 H9)) t0 (sym_eq T t0 t H8))) c0 (sym_eq C c0 d1 H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal C (CHead d1 (Bind Abst) t)) (refl_equal C c2)))))))))) (\lambda (n0: nat).(\lambda (H: -((\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: +((\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (t: T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 +(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))))).(\lambda -(c1: C).(\lambda (c2: C).(\lambda (H0: (csub3 g c1 c2)).(csub3_ind g (\lambda +(c1: C).(\lambda (c2: C).(\lambda (H0: (csubt g c1 c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (t: T).((drop (S n0) O c -(CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c0 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (t: T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Bind Abst) t))).(let H2 \def (match H1 in drop return (\lambda (n2: nat).(\lambda (n3: nat).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop n2 n3 c c0)).((eq nat n2 (S n0)) \to ((eq nat n3 O) \to ((eq C c (CSort n1)) \to ((eq -C c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 +C c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) -(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))))) with [(drop_refl c) \Rightarrow (\lambda (H2: (eq nat O (S n0))).(\lambda (H3: (eq nat O @@ -533,9 +533,9 @@ O)).(\lambda (H4: (eq C c (CSort n1))).(\lambda (H5: (eq C c (CHead d1 (Bind Abst) t))).((let H6 \def (eq_ind nat O (\lambda (e: nat).(match e in nat return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n0) H2) in (False_ind ((eq nat O O) \to ((eq C c (CSort n1)) -\to ((eq C c (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 +\to ((eq C c (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) -t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))) H6)) H3 H4 H5))))) | (drop_drop k h c e H2 u) \Rightarrow (\lambda (H3: (eq nat (S h) (S @@ -545,18 +545,18 @@ nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O \Rightarrow h | (S n2) \Rightarrow n2])) (S h) (S n0) H3) in (eq_ind nat n0 (\lambda (n2: nat).((eq nat O O) \to ((eq C (CHead c k u) (CSort n1)) \to ((eq C e (CHead d1 (Bind Abst) t)) \to ((drop (r k n2) O c e) \to (or -(ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda -(_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O +(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (_: (eq nat O O)).(\lambda (H9: (eq C (CHead c k u) (CSort n1))).(let H10 \def (eq_ind C (CHead c k u) (\lambda (e0: C).(match e0 in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n1) H9) in (False_ind ((eq C e (CHead d1 (Bind Abst) t)) \to ((drop (r k n0) O c e) \to -(or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O +(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda -(_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O +(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))) H10)))) h (sym_eq nat h n0 H7))) H4 H5 H6 H2))))) | (drop_skip k h d c e H2 u) \Rightarrow (\lambda (H3: (eq nat h (S @@ -565,8 +565,8 @@ n0))).(\lambda (H4: (eq nat (S d) O)).(\lambda (H5: (eq C (CHead c k (lift h Abst) t))).(eq_ind nat (S n0) (\lambda (n2: nat).((eq nat (S d) O) \to ((eq C (CHead c k (lift n2 (r k d) u)) (CSort n1)) \to ((eq C (CHead e k u) (CHead d1 (Bind Abst) t)) \to ((drop n2 (r k d) c e) \to (or (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 +(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (H7: (eq nat (S d) O)).(let H8 \def (eq_ind nat (S d) (\lambda (e0: @@ -574,230 +574,230 @@ nat).(match e0 in nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind ((eq C (CHead c k (lift (S n0) (r k d) u)) (CSort n1)) \to ((eq C (CHead e k u) (CHead d1 (Bind Abst) t)) \to ((drop (S n0) (r k d) c e) \to (or (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 +(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) H8))) h (sym_eq nat h (S n0) H3) H4 H5 H6 H2)))))]) in (H2 (refl_equal nat (S n0)) (refl_equal nat O) (refl_equal C (CSort n1)) (refl_equal C (CHead d1 -(Bind Abst) t)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 +(Bind Abst) t)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (t: T).((drop (S n0) O c0 -(CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (t: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 +(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda (t: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Bind Abst) -t))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop +t))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) -(or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O +(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (H4: (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) -t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 -O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) +t))))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 +O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) -t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda -(x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x -(Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +(x: C).(\lambda (H5: (csubt g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x +(Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) -(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex_intro2 -C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t))) x H5 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abst) t) H6 u)))))) H4)) (\lambda (H4: (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g -d2 u0 t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +d2 u0 t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) (or (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda -(_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O +(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: -(csub3 g d1 x0)).(\lambda (H6: (drop n0 O c3 (CHead x0 (Bind Abbr) +(csubt g d1 x0)).(\lambda (H6: (drop n0 O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) x0 x1 H5 (drop_drop (Bind b) n0 c3 (CHead x0 (Bind Abbr) x1) H6 u) H7))))))) H4)) (H c0 c3 H1 d1 t (drop_gen_drop (Bind b) c0 (CHead d1 (Bind Abst) t) u n0 H3)))))))) (\lambda (f: F).(\lambda (u: T).(\lambda (d1: C).(\lambda (t: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f) u) -(CHead d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(CHead d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (or (ex2 C (\lambda (d2: C).(csub3 g +C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind -Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) +Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) -(\lambda (H4: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop -(S n0) O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g +(\lambda (H4: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop +(S n0) O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t))) (or -(ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x: C).(\lambda (H5: (csub3 +C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x: C).(\lambda (H5: (csubt g d1 x)).(\lambda (H6: (drop (S n0) O c3 (CHead x (Bind Abst) t))).(or_introl -(ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g +C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t))) x H5 (drop_drop (Flat f) n0 c3 (CHead x (Bind Abst) t) H6 u)))))) -H4)) (\lambda (H4: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +H4)) (\lambda (H4: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))).(ex3_2_ind -C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda -(d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) (or (ex2 C (\lambda (d2: C).(csub3 +(d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 -t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (csub3 g d1 +t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (csubt g d1 x0)).(\lambda (H6: (drop (S n0) O c3 (CHead x0 (Bind Abbr) x1))).(\lambda -(H7: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(H7: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) -t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) -(ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +(ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) x0 x1 H5 (drop_drop (Flat f) n0 c3 (CHead x0 (Bind Abbr) x1) H6 u) H7))))))) H4)) (H2 d1 t (drop_gen_drop (Flat f) c0 (CHead d1 (Bind Abst) t) u n0 H3)))))))) -k)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 +k)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (t: T).((drop (S n0) O c0 (CHead -d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda -(d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (t: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Bind -Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g -d2 u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +d2 u t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C -T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H5: -(ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 -(CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 +(CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda -(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t))))) (\lambda (x: C).(\lambda (H6: (csub3 g d1 x)).(\lambda +T).(ty3 g d2 u t))))) (\lambda (x: C).(\lambda (H6: (csubt g d1 x)).(\lambda (H7: (drop n0 O c3 (CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t))) x H6 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abst) t) H7 u2)))))) H5)) (\lambda -(H5: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +(H5: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g -d2 u t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop +d2 u t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x0: C).(\lambda -(x1: T).(\lambda (H6: (csub3 g d1 x0)).(\lambda (H7: (drop n0 O c3 (CHead x0 +(x1: T).(\lambda (H6: (csubt g d1 x0)).(\lambda (H7: (drop n0 O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H8: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda -(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 +T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x0 x1 H6 (drop_drop (Bind b) n0 c3 (CHead x0 (Bind Abbr) x1) H7 u2) H8))))))) H5)) (H c0 c3 H1 d1 t (drop_gen_drop (Bind Void) c0 (CHead d1 (Bind Abst) t) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda -(H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (t: T).((drop -(S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 +(H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (t: T).((drop +(S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) -(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (t0: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Bind Abst) -t0))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop +t0))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) -(or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O +(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda -(d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))) (\lambda (H5: (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 -(Bind Abst) t0))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 +(Bind Abst) t0))))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t0))) (or (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: -T).(ty3 g d2 u0 t0))))) (\lambda (x: C).(\lambda (H6: (csub3 g d1 +T).(ty3 g d2 u0 t0))))) (\lambda (x: C).(\lambda (H6: (csubt g d1 x)).(\lambda (H7: (drop n0 O c3 (CHead x (Bind Abst) t0))).(or_introl (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (ex_intro2 C (\lambda (d2: C).(csub3 +C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0))) x H6 (drop_drop (Bind Abbr) n0 c3 (CHead x (Bind Abst) t0) H7 u)))))) H5)) (\lambda (H5: (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 -t0))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) +t0))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))) (or (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: -(csub3 g d1 x0)).(\lambda (H7: (drop n0 O c3 (CHead x0 (Bind Abbr) +(csubt g d1 x0)).(\lambda (H7: (drop n0 O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H8: (ty3 g x0 x1 t0)).(or_intror (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))) x0 x1 H6 (drop_drop (Bind Abbr) n0 c3 (CHead x0 (Bind Abbr) x1) H7 u) H8))))))) H5)) (H c0 c3 H1 d1 t0 (drop_gen_drop (Bind Abst) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/fwd.ma new file mode 100644 index 000000000..14a5c05ec --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/fwd.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/fwd". + +include "csubt/defs.ma". + +axiom csubt_gen_abbr: + \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v: T).((csubt g +(CHead e1 (Bind Abbr) v) c2) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 +(Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2))))))) +. + +axiom csubt_gen_abst: + \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v1: T).((csubt g +(CHead e1 (Bind Abst) v1) c2) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead +e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) (ex3_2 C T (\lambda +(e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: +C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g +e2 v2 v1))))))))) +. + +axiom csubt_gen_bind: + \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall +(v1: T).((csubt g (CHead e1 (Bind b1) v1) c2) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2)))))))))) +. + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/getl.ma similarity index 70% rename from matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/getl.ma rename to matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/getl.ma index acb352ea3..4210416c0 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/getl.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/getl.ma @@ -14,44 +14,44 @@ (* This file was automatically generated: do not edit *********************) -set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/getl". +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/getl". -include "csub3/fwd.ma". +include "csubt/fwd.ma". -include "csub3/clear.ma". +include "csubt/clear.ma". -include "csub3/drop.ma". +include "csubt/drop.ma". include "getl/clear.ma". -theorem csub3_getl_abbr: +theorem csubt_getl_abbr: \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall -(n: nat).((getl n c1 (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csub3 g -c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n +(n: nat).((getl n c1 (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csubt g +c1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))))))))))) \def \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda (n: nat).(\lambda (H: (getl n c1 (CHead d1 (Bind Abbr) u))).(let H0 \def (getl_gen_all c1 (CHead d1 (Bind Abbr) u) n H) in (ex2_ind C (\lambda (e: C).(drop n O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u))) -(\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 +(\forall (c2: C).((csubt g c1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))) (\lambda (x: C).(\lambda (H1: (drop n O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind Abbr) u))).(C_ind (\lambda (c: C).((drop n O c1 c) \to ((clear c (CHead d1 -(Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda -(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) +(Bind Abbr) u)) \to (\forall (c2: C).((csubt g c1 c2) \to (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (n0: nat).(\lambda (_: (drop n O c1 (CSort n0))).(\lambda (H4: (clear (CSort n0) (CHead d1 (Bind Abbr) u))).(clear_gen_sort (CHead d1 -(Bind Abbr) u) n0 H4 (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda -(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) +(Bind Abbr) u) n0 H4 (\forall (c2: C).((csubt g c1 c2) \to (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))))))) (\lambda (x0: C).(\lambda (_: (((drop n O c1 x0) \to ((clear x0 -(CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind +(CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csubt g c1 c2) \to (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: (drop n O c1 (CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 (Bind Abbr) u))).(K_ind (\lambda (k0: K).((drop n O c1 (CHead x0 k0 t)) \to ((clear -(CHead x0 k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 -c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 +(CHead x0 k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csubt g c1 +c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (b: B).(\lambda (H5: (drop n O c1 (CHead x0 (Bind b) t))).(\lambda (H6: (clear (CHead x0 (Bind b) t) (CHead d1 (Bind Abbr) u))).(let H7 \def (f_equal C C (\lambda (e: C).(match e in C @@ -67,85 +67,85 @@ return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind Abbr) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) t H6)) in (\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda -(c2: C).(\lambda (H12: (csub3 g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda +(c2: C).(\lambda (H12: (csubt g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t0: T).(drop n O c1 (CHead x0 (Bind b) t0))) H5 u H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: B).(drop n O c1 (CHead x0 (Bind b0) u))) H13 Abbr H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop n O c1 (CHead c -(Bind Abbr) u))) H14 d1 H11) in (ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) +(Bind Abbr) u))) H14 d1 H11) in (ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))) -(\lambda (x1: C).(\lambda (H16: (csub3 g d1 x1)).(\lambda (H17: (drop n O c2 -(CHead x1 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) +C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))) +(\lambda (x1: C).(\lambda (H16: (csubt g d1 x1)).(\lambda (H17: (drop n O c2 +(CHead x1 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) x1 H16 (getl_intro n c2 (CHead x1 (Bind Abbr) u) (CHead x1 (Bind Abbr) u) H17 (clear_bind Abbr x1 -u)))))) (csub3_drop_abbr g n c1 c2 H12 d1 u H15)))))))))) H8)) H7))))) +u)))))) (csubt_drop_abbr g n c1 c2 H12 d1 u H15)))))))))) H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop n O c1 (CHead x0 (Flat f) t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abbr) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop n O c (CHead x0 (Flat f) t)) \to -(\forall (c2: C).((csub3 g c c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(\forall (c2: C).((csubt g c c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))))) (nat_ind (\lambda (n0: nat).(\forall (x1: C).((drop n0 O x1 (CHead x0 (Flat f) t)) \to (\forall -(c2: C).((csub3 g x1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(c2: C).((csubt g x1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (x1: C).(\lambda (H8: (drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: -C).(\lambda (H9: (csub3 g x1 c2)).(let H10 \def (eq_ind C x1 (\lambda (c: -C).(csub3 g c c2)) H9 (CHead x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat +C).(\lambda (H9: (csubt g x1 c2)).(let H10 \def (eq_ind C x1 (\lambda (c: +C).(csubt g c c2)) H9 (CHead x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat f) t) H8)) in (let H_y \def (clear_flat x0 (CHead d1 (Bind Abbr) u) (clear_gen_flat f x0 (CHead d1 (Bind Abbr) u) t H6) f t) in (let H11 \def -(csub3_clear_conf g (CHead x0 (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u) -H_y) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead d1 (Bind Abbr) u) e2)) -(\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(csubt_clear_conf g (CHead x0 (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u) +H_y) in (ex2_ind C (\lambda (e2: C).(csubt g (CHead d1 (Bind Abbr) u) e2)) +(\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x2: -C).(\lambda (H12: (csub3 g (CHead d1 (Bind Abbr) u) x2)).(\lambda (H13: -(clear c2 x2)).(let H14 \def (csub3_gen_abbr g d1 x2 u H12) in (ex2_ind C -(\lambda (e2: C).(eq C x2 (CHead e2 (Bind Abbr) u))) (\lambda (e2: C).(csub3 -g d1 e2)) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O +C).(\lambda (H12: (csubt g (CHead d1 (Bind Abbr) u) x2)).(\lambda (H13: +(clear c2 x2)).(let H14 \def (csubt_gen_abbr g d1 x2 u H12) in (ex2_ind C +(\lambda (e2: C).(eq C x2 (CHead e2 (Bind Abbr) u))) (\lambda (e2: C).(csubt +g d1 e2)) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x3: C).(\lambda (H15: (eq C x2 -(CHead x3 (Bind Abbr) u))).(\lambda (H16: (csub3 g d1 x3)).(let H17 \def +(CHead x3 (Bind Abbr) u))).(\lambda (H16: (csubt g d1 x3)).(let H17 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abbr) u) H15) -in (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 +in (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u))) x3 H16 (getl_intro O c2 (CHead x3 (Bind Abbr) u) c2 (drop_refl c2) H17)))))) H14))))) H11)))))))) (\lambda (n0: nat).(\lambda (H8: ((\forall (x1: C).((drop n0 O x1 (CHead x0 (Flat f) t)) \to (\forall -(c2: C).((csub3 g x1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(c2: C).((csubt g x1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u)))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n0) O x1 (CHead x0 (Flat f) t))).(\lambda (c2: -C).(\lambda (H10: (csub3 g x1 c2)).(let H11 \def (drop_clear x1 (CHead x0 +C).(\lambda (H10: (csubt g x1 c2)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n0 H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead x0 (Flat f) t))))) -(ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: (clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n0 -O x3 (CHead x0 (Flat f) t))).(let H14 \def (csub3_clear_conf g x1 c2 H10 -(CHead x3 (Bind x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead +O x3 (CHead x0 (Flat f) t))).(let H14 \def (csubt_clear_conf g x1 c2 H10 +(CHead x3 (Bind x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csubt g (CHead x3 (Bind x2) x4) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (x5: C).(\lambda (H15: (csub3 g (CHead x3 (Bind x2) x4) -x5)).(\lambda (H16: (clear c2 x5)).(let H17 \def (csub3_gen_bind g x2 x3 x5 +C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) +u)))) (\lambda (x5: C).(\lambda (H15: (csubt g (CHead x3 (Bind x2) x4) +x5)).(\lambda (H16: (clear c2 x5)).(let H17 \def (csubt_gen_bind g x2 x3 x5 x4 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csub3 g x3 e2)))) (ex2 C (\lambda (d2: C).(csub3 g d1 +C).(\lambda (_: T).(csubt g x3 e2)))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x6: B).(\lambda (x7: C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 -(Bind x6) x8))).(\lambda (H19: (csub3 g x3 x7)).(let H20 \def (eq_ind C x5 +(Bind x6) x8))).(\lambda (H19: (csubt g x3 x7)).(let H20 \def (eq_ind C x5 (\lambda (c: C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 -\def (H8 x3 H13 x7 H19) in (ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) +\def (H8 x3 H13 x7 H19) in (ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 x7 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (x9: C).(\lambda (H22: (csub3 g d1 x9)).(\lambda (H23: (getl -n0 x7 (CHead x9 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 +C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) +u)))) (\lambda (x9: C).(\lambda (H22: (csubt g d1 x9)).(\lambda (H23: (getl +n0 x7 (CHead x9 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u))) x9 H22 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) u) n0 H23))))) H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). -theorem csub3_getl_abst: +theorem csubt_getl_abst: \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (t: T).(\forall -(n: nat).((getl n c1 (CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csub3 g -c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +(n: nat).((getl n c1 (CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csubt g +c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))) \def @@ -153,36 +153,36 @@ t)))))))))))) (n: nat).(\lambda (H: (getl n c1 (CHead d1 (Bind Abst) t))).(let H0 \def (getl_gen_all c1 (CHead d1 (Bind Abst) t) n H) in (ex2_ind C (\lambda (e: C).(drop n O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) t))) -(\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 +(\forall (c2: C).((csubt g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))) (\lambda (x: C).(\lambda (H1: (drop n O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind Abst) t))).(C_ind (\lambda (c: C).((drop n O c1 c) \to ((clear c (CHead d1 (Bind Abst) t)) \to (\forall (c2: -C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +C).((csubt g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (n0: nat).(\lambda (_: (drop n O c1 (CSort n0))).(\lambda (H4: (clear (CSort n0) (CHead d1 (Bind Abst) -t))).(clear_gen_sort (CHead d1 (Bind Abst) t) n0 H4 (\forall (c2: C).((csub3 -g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +t))).(clear_gen_sort (CHead d1 (Bind Abst) t) n0 H4 (\forall (c2: C).((csubt +g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))) (\lambda (x0: C).(\lambda (_: (((drop n O c1 x0) \to ((clear x0 -(CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 -C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +(CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csubt g c1 c2) \to (or (ex2 +C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 +(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (H3: (drop n O c1 (CHead x0 k t0))).(\lambda (H4: (clear (CHead x0 k t0) (CHead d1 (Bind Abst) t))).(K_ind (\lambda (k0: K).((drop n O c1 (CHead x0 k0 t0)) \to ((clear (CHead x0 k0 t0) (CHead d1 -(Bind Abst) t)) \to (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda -(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) -t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +(Bind Abst) t)) \to (\forall (c2: C).((csubt g c1 c2) \to (or (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) +t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (b: B).(\lambda (H5: (drop n O c1 (CHead x0 (Bind b) t0))).(\lambda (H6: (clear (CHead x0 (Bind b) @@ -199,198 +199,198 @@ return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) [(CSort _) \Rightarrow t | (CHead _ _ t1) \Rightarrow t1])) (CHead d1 (Bind Abst) t) (CHead x0 (Bind b) t0) (clear_gen_bind b x0 (CHead d1 (Bind Abst) t) t0 H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 -x0)).(\lambda (c2: C).(\lambda (H12: (csub3 g c1 c2)).(let H13 \def (eq_ind_r +x0)).(\lambda (c2: C).(\lambda (H12: (csubt g c1 c2)).(let H13 \def (eq_ind_r T t0 (\lambda (t1: T).(drop n O c1 (CHead x0 (Bind b) t1))) H5 t H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: B).(drop n O c1 (CHead x0 (Bind b0) t))) H13 Abst H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop n O c1 (CHead c (Bind Abst) t))) H14 d1 H11) in (or_ind (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t)))) -(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t)))) +(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 +C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t))))) (\lambda (H16: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +T).(ty3 g d2 u t))))) (\lambda (H16: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t))))).(ex2_ind C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 -(Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 +(Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t))))) (\lambda (x1: C).(\lambda (H17: (csub3 g d1 x1)).(\lambda (H18: (drop -n O c2 (CHead x1 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g +t))))) (\lambda (x1: C).(\lambda (H17: (csubt g d1 x1)).(\lambda (H18: (drop +n O c2 (CHead x1 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t))) x1 H17 (getl_intro n c2 (CHead x1 (Bind Abst) t) (CHead x1 (Bind Abst) t) H18 (clear_bind Abst x1 t))))))) -H16)) (\lambda (H16: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +H16)) (\lambda (H16: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t))))) (\lambda (x1: C).(\lambda (x2: T).(\lambda (H17: (csub3 g d1 +t))))) (\lambda (x1: C).(\lambda (x2: T).(\lambda (H17: (csubt g d1 x1)).(\lambda (H18: (drop n O c2 (CHead x1 (Bind Abbr) x2))).(\lambda (H19: -(ty3 g x1 x2 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +(ty3 g x1 x2 t)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) +t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x1 x2 H17 (getl_intro n c2 (CHead x1 (Bind Abbr) x2) (CHead x1 (Bind Abbr) x2) H18 (clear_bind Abbr x1 -x2)) H19))))))) H16)) (csub3_drop_abst g n c1 c2 H12 d1 t H15)))))))))) H8)) +x2)) H19))))))) H16)) (csubt_drop_abst g n c1 c2 H12 d1 t H15)))))))))) H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop n O c1 (CHead x0 (Flat f) t0))).(\lambda (H6: (clear (CHead x0 (Flat f) t0) (CHead d1 (Bind Abst) t))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop n O c (CHead x0 -(Flat f) t0)) \to (\forall (c2: C).((csub3 g c c2) \to (or (ex2 C (\lambda -(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) -t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +(Flat f) t0)) \to (\forall (c2: C).((csubt g c c2) \to (or (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) +t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))) (nat_ind (\lambda (n0: nat).(\forall (x1: C).((drop n0 O x1 (CHead x0 (Flat f) t0)) \to (\forall -(c2: C).((csub3 g x1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(c2: C).((csubt g x1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda -(d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (x1: C).(\lambda (H8: (drop O O x1 (CHead -x0 (Flat f) t0))).(\lambda (c2: C).(\lambda (H9: (csub3 g x1 c2)).(let H10 -\def (eq_ind C x1 (\lambda (c: C).(csub3 g c c2)) H9 (CHead x0 (Flat f) t0) +x0 (Flat f) t0))).(\lambda (c2: C).(\lambda (H9: (csubt g x1 c2)).(let H10 +\def (eq_ind C x1 (\lambda (c: C).(csubt g c c2)) H9 (CHead x0 (Flat f) t0) (drop_gen_refl x1 (CHead x0 (Flat f) t0) H8)) in (let H_y \def (clear_flat x0 (CHead d1 (Bind Abst) t) (clear_gen_flat f x0 (CHead d1 (Bind Abst) t) t0 H6) -f t0) in (let H11 \def (csub3_clear_conf g (CHead x0 (Flat f) t0) c2 H10 -(CHead d1 (Bind Abst) t) H_y) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead +f t0) in (let H11 \def (csubt_clear_conf g (CHead x0 (Flat f) t0) c2 H10 +(CHead d1 (Bind Abst) t) H_y) in (ex2_ind C (\lambda (e2: C).(csubt g (CHead d1 (Bind Abst) t) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda -(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) -t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) +t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x2: C).(\lambda (H12: (csub3 +C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x2: C).(\lambda (H12: (csubt g (CHead d1 (Bind Abst) t) x2)).(\lambda (H13: (clear c2 x2)).(let H14 \def -(csub3_gen_abst g d1 x2 t H12) in (or_ind (ex2 C (\lambda (e2: C).(eq C x2 -(CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2))) (ex3_2 C T +(csubt_gen_abst g d1 x2 t H12) in (or_ind (ex2 C (\lambda (e2: C).(eq C x2 +(CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt g d1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x2 (CHead e2 (Bind Abbr) v2)))) -(\lambda (e2: C).(\lambda (_: T).(csub3 g d1 e2))) (\lambda (e2: C).(\lambda -(v2: T).(ty3 g e2 v2 t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(\lambda (e2: C).(\lambda (_: T).(csubt g d1 e2))) (\lambda (e2: C).(\lambda +(v2: T).(ty3 g e2 v2 t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda -(d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H15: (ex2 C (\lambda (e2: C).(eq C x2 (CHead -e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2)))).(ex2_ind C (\lambda -(e2: C).(eq C x2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2)) -(or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 +e2 (Bind Abst) t))) (\lambda (e2: C).(csubt g d1 e2)))).(ex2_ind C (\lambda +(e2: C).(eq C x2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt g d1 e2)) +(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x3: C).(\lambda (H16: (eq C x2 (CHead x3 (Bind Abst) t))).(\lambda -(H17: (csub3 g d1 x3)).(let H18 \def (eq_ind C x2 (\lambda (c: C).(clear c2 +(H17: (csubt g d1 x3)).(let H18 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abst) t) H16) in (or_introl (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) -(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) +(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g +C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t))) x3 H17 (getl_intro O c2 (CHead x3 (Bind Abst) t) c2 (drop_refl c2) H18))))))) H15)) (\lambda (H15: (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x2 (CHead -e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g d1 e2))) +e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t))))).(ex3_2_ind C T (\lambda (e2: C).(\lambda (v2: T).(eq C x2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: -C).(\lambda (_: T).(csub3 g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g -e2 v2 t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g +e2 v2 t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (H16: (eq C x2 (CHead x3 -(Bind Abbr) x4))).(\lambda (H17: (csub3 g d1 x3)).(\lambda (H18: (ty3 g x3 x4 +(Bind Abbr) x4))).(\lambda (H17: (csubt g d1 x3)).(\lambda (H18: (ty3 g x3 x4 t)).(let H19 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 -(Bind Abbr) x4) H16) in (or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(Bind Abbr) x4) H16) in (or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda -(d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 +T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x3 x4 H17 (getl_intro O c2 (CHead x3 (Bind Abbr) x4) c2 (drop_refl c2) H19) H18)))))))) H15)) H14))))) H11)))))))) (\lambda (n0: nat).(\lambda (H8: ((\forall (x1: -C).((drop n0 O x1 (CHead x0 (Flat f) t0)) \to (\forall (c2: C).((csub3 g x1 -c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl +C).((drop n0 O x1 (CHead x0 (Flat f) t0)) \to (\forall (c2: C).((csubt g x1 +c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n0) O x1 (CHead x0 (Flat -f) t0))).(\lambda (c2: C).(\lambda (H10: (csub3 g x1 c2)).(let H11 \def +f) t0))).(\lambda (c2: C).(\lambda (H10: (csubt g x1 c2)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t0) n0 H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead x0 (Flat -f) t0))))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +f) t0))))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: (clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n0 O x3 (CHead x0 -(Flat f) t0))).(let H14 \def (csub3_clear_conf g x1 c2 H10 (CHead x3 (Bind -x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead x3 (Bind x2) x4) -e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csub3 g d1 +(Flat f) t0))).(let H14 \def (csubt_clear_conf g x1 c2 H10 (CHead x3 (Bind +x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csubt g (CHead x3 (Bind x2) x4) +e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t))))) (\lambda (x5: C).(\lambda (H15: (csub3 g (CHead x3 +(u: T).(ty3 g d2 u t))))) (\lambda (x5: C).(\lambda (H15: (csubt g (CHead x3 (Bind x2) x4) x5)).(\lambda (H16: (clear c2 x5)).(let H17 \def -(csub3_gen_bind g x2 x3 x5 x4 H15) in (ex2_3_ind B C T (\lambda (b2: +(csubt_gen_bind g x2 x3 x5 x4 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g x3 e2)))) (or (ex2 -C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead -d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g x3 e2)))) (or (ex2 +C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead +d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x6: B).(\lambda (x7: C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind -x6) x8))).(\lambda (H19: (csub3 g x3 x7)).(let H20 \def (eq_ind C x5 (\lambda +x6) x8))).(\lambda (H19: (csubt g x3 x7)).(let H20 \def (eq_ind C x5 (\lambda (c: C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 -H13 x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +H13 x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 x7 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 x7 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 -u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl +u t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda -(_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 +(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t))))) (\lambda (H22: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +t))))) (\lambda (H22: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 x7 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 x7 (CHead d2 (Bind Abst) t))) -(or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 +C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 x7 (CHead d2 (Bind Abst) t))) +(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (x9: C).(\lambda (H23: (csub3 g d1 x9)).(\lambda (H24: (getl n0 x7 -(CHead x9 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 +(\lambda (x9: C).(\lambda (H23: (csubt g d1 x9)).(\lambda (H24: (getl n0 x7 +(CHead x9 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) +(u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t))) x9 H23 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abst) t) n0 H24)))))) H22)) -(\lambda (H22: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) +(\lambda (H22: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 x7 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda -(d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 x7 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g -d2 u t))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (H23: (csub3 g d1 +d2 u t))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (H23: (csubt g d1 x9)).(\lambda (H24: (getl n0 x7 (CHead x9 (Bind Abbr) x10))).(\lambda (H25: -(ty3 g x9 x10 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(ty3 g x9 x10 t)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x9 x10 H23 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) x10) n0 H24) H25))))))) H22)) H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))) k H3 diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/pc3.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/pc3.ma similarity index 73% rename from matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/pc3.ma rename to matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/pc3.ma index 980672598..94e98b52a 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/pc3.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/pc3.ma @@ -14,45 +14,45 @@ (* This file was automatically generated: do not edit *********************) -set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/pc3". +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/pc3". -include "csub3/getl.ma". +include "csubt/getl.ma". include "pc3/left.ma". -theorem csub3_pr2: +theorem csubt_pr2: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr2 c1 -t1 t2) \to (\forall (c2: C).((csub3 g c1 c2) \to (pr2 c2 t1 t2))))))) +t1 t2) \to (\forall (c2: C).((csubt g c1 c2) \to (pr2 c2 t1 t2))))))) \def \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c1 t1 t2)).(pr2_ind (\lambda (c: C).(\lambda (t: T).(\lambda (t0: -T).(\forall (c2: C).((csub3 g c c2) \to (pr2 c2 t t0)))))) (\lambda (c: +T).(\forall (c2: C).((csubt g c c2) \to (pr2 c2 t t0)))))) (\lambda (c: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(\lambda (c2: -C).(\lambda (_: (csub3 g c c2)).(pr2_free c2 t3 t4 H0))))))) (\lambda (c: +C).(\lambda (_: (csubt g c c2)).(pr2_free c2 t3 t4 H0))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (c2: -C).(\lambda (H3: (csub3 g c c2)).(let H4 \def (csub3_getl_abbr g c d u i H0 -c2 H3) in (ex2_ind C (\lambda (d2: C).(csub3 g d d2)) (\lambda (d2: C).(getl +C).(\lambda (H3: (csubt g c c2)).(let H4 \def (csubt_getl_abbr g c d u i H0 +c2 H3) in (ex2_ind C (\lambda (d2: C).(csubt g d d2)) (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (pr2 c2 t3 t) (\lambda (x: C).(\lambda (_: -(csub3 g d x)).(\lambda (H6: (getl i c2 (CHead x (Bind Abbr) u))).(pr2_delta +(csubt g d x)).(\lambda (H6: (getl i c2 (CHead x (Bind Abbr) u))).(pr2_delta c2 x u i H6 t3 t4 H1 t H2)))) H4)))))))))))))) c1 t1 t2 H))))). -theorem csub3_pc3: +theorem csubt_pc3: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pc3 c1 -t1 t2) \to (\forall (c2: C).((csub3 g c1 c2) \to (pc3 c2 t1 t2))))))) +t1 t2) \to (\forall (c2: C).((csubt g c1 c2) \to (pc3 c2 t1 t2))))))) \def \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c1 t1 t2)).(pc3_ind_left c1 (\lambda (t: T).(\lambda (t0: -T).(\forall (c2: C).((csub3 g c1 c2) \to (pc3 c2 t t0))))) (\lambda (t: -T).(\lambda (c2: C).(\lambda (_: (csub3 g c1 c2)).(pc3_refl c2 t)))) (\lambda +T).(\forall (c2: C).((csubt g c1 c2) \to (pc3 c2 t t0))))) (\lambda (t: +T).(\lambda (c2: C).(\lambda (_: (csubt g c1 c2)).(pc3_refl c2 t)))) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c1 t0 t3)).(\lambda (t4: -T).(\lambda (_: (pc3 c1 t3 t4)).(\lambda (H2: ((\forall (c2: C).((csub3 g c1 -c2) \to (pc3 c2 t3 t4))))).(\lambda (c2: C).(\lambda (H3: (csub3 g c1 -c2)).(pc3_pr2_u c2 t3 t0 (csub3_pr2 g c1 t0 t3 H0 c2 H3) t4 (H2 c2 +T).(\lambda (_: (pc3 c1 t3 t4)).(\lambda (H2: ((\forall (c2: C).((csubt g c1 +c2) \to (pc3 c2 t3 t4))))).(\lambda (c2: C).(\lambda (H3: (csubt g c1 +c2)).(pc3_pr2_u c2 t3 t0 (csubt_pr2 g c1 t0 t3 H0 c2 H3) t4 (H2 c2 H3)))))))))) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c1 t0 t3)).(\lambda (t4: T).(\lambda (_: (pc3 c1 t0 t4)).(\lambda (H2: ((\forall -(c2: C).((csub3 g c1 c2) \to (pc3 c2 t0 t4))))).(\lambda (c2: C).(\lambda -(H3: (csub3 g c1 c2)).(pc3_t t0 c2 t3 (pc3_pr2_x c2 t3 t0 (csub3_pr2 g c1 t0 +(c2: C).((csubt g c1 c2) \to (pc3 c2 t0 t4))))).(\lambda (c2: C).(\lambda +(H3: (csubt g c1 c2)).(pc3_t t0 c2 t3 (pc3_pr2_x c2 t3 t0 (csubt_pr2 g c1 t0 t3 H0 c2 H3)) t4 (H2 c2 H3)))))))))) t1 t2 H))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/props.ma similarity index 79% rename from matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/props.ma rename to matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/props.ma index 3258cda57..c4321b61b 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/props.ma @@ -14,14 +14,14 @@ (* This file was automatically generated: do not edit *********************) -set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/props". +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/props". -include "csub3/defs.ma". +include "csubt/defs.ma". -theorem csub3_refl: - \forall (g: G).(\forall (c: C).(csub3 g c c)) +theorem csubt_refl: + \forall (g: G).(\forall (c: C).(csubt g c c)) \def - \lambda (g: G).(\lambda (c: C).(C_ind (\lambda (c0: C).(csub3 g c0 c0)) -(\lambda (n: nat).(csub3_sort g n)) (\lambda (c0: C).(\lambda (H: (csub3 g c0 -c0)).(\lambda (k: K).(\lambda (t: T).(csub3_head g c0 c0 H k t))))) c)). + \lambda (g: G).(\lambda (c: C).(C_ind (\lambda (c0: C).(csubt g c0 c0)) +(\lambda (n: nat).(csubt_sort g n)) (\lambda (c0: C).(\lambda (H: (csubt g c0 +c0)).(\lambda (k: K).(\lambda (t: T).(csubt_head g c0 c0 H k t))))) c)). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/ty3.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/ty3.ma similarity index 68% rename from matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/ty3.ma rename to matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/ty3.ma index 26ad14f35..9e0eb6534 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/ty3.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/ty3.ma @@ -14,86 +14,86 @@ (* This file was automatically generated: do not edit *********************) -set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/ty3". +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubt/ty3". -include "csub3/pc3.ma". +include "csubt/pc3.ma". -include "csub3/props.ma". +include "csubt/props.ma". -theorem csub3_ty3: +theorem csubt_ty3: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1 -t1 t2) \to (\forall (c2: C).((csub3 g c1 c2) \to (ty3 g c2 t1 t2))))))) +t1 t2) \to (\forall (c2: C).((csubt g c1 c2) \to (ty3 g c2 t1 t2))))))) \def \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (ty3 g c1 t1 t2)).(ty3_ind g (\lambda (c: C).(\lambda (t: T).(\lambda -(t0: T).(\forall (c2: C).((csub3 g c c2) \to (ty3 g c2 t t0)))))) (\lambda +(t0: T).(\forall (c2: C).((csubt g c c2) \to (ty3 g c2 t t0)))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (t: T).(\lambda (_: (ty3 g c t0 t)).(\lambda -(H1: ((\forall (c2: C).((csub3 g c c2) \to (ty3 g c2 t0 t))))).(\lambda (u: +(H1: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 t0 t))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (_: (ty3 g c u t3)).(\lambda (H3: ((\forall (c2: -C).((csub3 g c c2) \to (ty3 g c2 u t3))))).(\lambda (H4: (pc3 c t3 -t0)).(\lambda (c2: C).(\lambda (H5: (csub3 g c c2)).(ty3_conv g c2 t0 t (H1 -c2 H5) u t3 (H3 c2 H5) (csub3_pc3 g c t3 t0 H4 c2 H5)))))))))))))) (\lambda -(c: C).(\lambda (m: nat).(\lambda (c2: C).(\lambda (_: (csub3 g c +C).((csubt g c c2) \to (ty3 g c2 u t3))))).(\lambda (H4: (pc3 c t3 +t0)).(\lambda (c2: C).(\lambda (H5: (csubt g c c2)).(ty3_conv g c2 t0 t (H1 +c2 H5) u t3 (H3 c2 H5) (csubt_pc3 g c t3 t0 H4 c2 H5)))))))))))))) (\lambda +(c: C).(\lambda (m: nat).(\lambda (c2: C).(\lambda (_: (csubt g c c2)).(ty3_sort g c2 m))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda -(t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: ((\forall (c2: C).((csub3 g -d c2) \to (ty3 g c2 u t))))).(\lambda (c2: C).(\lambda (H3: (csub3 g c -c2)).(let H4 \def (csub3_getl_abbr g c d u n H0 c2 H3) in (ex2_ind C (\lambda -(d2: C).(csub3 g d d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) +(t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: ((\forall (c2: C).((csubt g +d c2) \to (ty3 g c2 u t))))).(\lambda (c2: C).(\lambda (H3: (csubt g c +c2)).(let H4 \def (csubt_getl_abbr g c d u n H0 c2 H3) in (ex2_ind C (\lambda +(d2: C).(csubt g d d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (ty3 g c2 (TLRef n) (lift (S n) O t)) (\lambda (x: C).(\lambda (H5: -(csub3 g d x)).(\lambda (H6: (getl n c2 (CHead x (Bind Abbr) u))).(ty3_abbr g +(csubt g d x)).(\lambda (H6: (getl n c2 (CHead x (Bind Abbr) u))).(ty3_abbr g n c2 x u H6 t (H2 x H5))))) H4)))))))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: -((\forall (c2: C).((csub3 g d c2) \to (ty3 g c2 u t))))).(\lambda (c2: -C).(\lambda (H3: (csub3 g c c2)).(let H4 \def (csub3_getl_abst g c d u n H0 -c2 H3) in (or_ind (ex2 C (\lambda (d2: C).(csub3 g d d2)) (\lambda (d2: +((\forall (c2: C).((csubt g d c2) \to (ty3 g c2 u t))))).(\lambda (c2: +C).(\lambda (H3: (csubt g c c2)).(let H4 \def (csubt_getl_abst g c d u n H0 +c2 H3) in (or_ind (ex2 C (\lambda (d2: C).(csubt g d d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d d2))) (\lambda (d2: C).(\lambda (u0: T).(getl n +C).(\lambda (_: T).(csubt g d d2))) (\lambda (d2: C).(\lambda (u0: T).(getl n c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 u)))) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda (H5: (ex2 C (\lambda -(d2: C).(csub3 g d d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) -u))))).(ex2_ind C (\lambda (d2: C).(csub3 g d d2)) (\lambda (d2: C).(getl n +(d2: C).(csubt g d d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) +u))))).(ex2_ind C (\lambda (d2: C).(csubt g d d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda -(x: C).(\lambda (H6: (csub3 g d x)).(\lambda (H7: (getl n c2 (CHead x (Bind +(x: C).(\lambda (H6: (csubt g d x)).(\lambda (H7: (getl n c2 (CHead x (Bind Abst) u))).(ty3_abst g n c2 x u H7 t (H2 x H6))))) H5)) (\lambda (H5: (ex3_2 -C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d d2))) (\lambda (d2: +C T (\lambda (d2: C).(\lambda (_: T).(csubt g d d2))) (\lambda (d2: C).(\lambda (u0: T).(getl n c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 u))))).(ex3_2_ind C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d d2))) (\lambda (d2: C).(\lambda (u0: T).(getl n +C).(\lambda (_: T).(csubt g d d2))) (\lambda (d2: C).(\lambda (u0: T).(getl n c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 u))) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (_: (csub3 g d x0)).(\lambda (H7: (getl n c2 (CHead x0 (Bind +T).(\lambda (_: (csubt g d x0)).(\lambda (H7: (getl n c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H8: (ty3 g x0 x1 u)).(ty3_abbr g n c2 x0 x1 H7 u H8)))))) H5)) H4)))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (t: -T).(\lambda (_: (ty3 g c u t)).(\lambda (H1: ((\forall (c2: C).((csub3 g c +T).(\lambda (_: (ty3 g c u t)).(\lambda (H1: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 u t))))).(\lambda (b: B).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) t0 t3)).(\lambda (H3: ((\forall -(c2: C).((csub3 g (CHead c (Bind b) u) c2) \to (ty3 g c2 t0 t3))))).(\lambda +(c2: C).((csubt g (CHead c (Bind b) u) c2) \to (ty3 g c2 t0 t3))))).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) t3 t4)).(\lambda (H5: -((\forall (c2: C).((csub3 g (CHead c (Bind b) u) c2) \to (ty3 g c2 t3 -t4))))).(\lambda (c2: C).(\lambda (H6: (csub3 g c c2)).(ty3_bind g c2 u t (H1 -c2 H6) b t0 t3 (H3 (CHead c2 (Bind b) u) (csub3_head g c c2 H6 (Bind b) u)) -t4 (H5 (CHead c2 (Bind b) u) (csub3_head g c c2 H6 (Bind b) +((\forall (c2: C).((csubt g (CHead c (Bind b) u) c2) \to (ty3 g c2 t3 +t4))))).(\lambda (c2: C).(\lambda (H6: (csubt g c c2)).(ty3_bind g c2 u t (H1 +c2 H6) b t0 t3 (H3 (CHead c2 (Bind b) u) (csubt_head g c c2 H6 (Bind b) u)) +t4 (H5 (CHead c2 (Bind b) u) (csubt_head g c c2 H6 (Bind b) u)))))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda -(_: (ty3 g c w u)).(\lambda (H1: ((\forall (c2: C).((csub3 g c c2) \to (ty3 g +(_: (ty3 g c w u)).(\lambda (H1: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 w u))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c v (THead -(Bind Abst) u t))).(\lambda (H3: ((\forall (c2: C).((csub3 g c c2) \to (ty3 g -c2 v (THead (Bind Abst) u t)))))).(\lambda (c2: C).(\lambda (H4: (csub3 g c +(Bind Abst) u t))).(\lambda (H3: ((\forall (c2: C).((csubt g c c2) \to (ty3 g +c2 v (THead (Bind Abst) u t)))))).(\lambda (c2: C).(\lambda (H4: (csubt g c c2)).(ty3_appl g c2 w u (H1 c2 H4) v t (H3 c2 H4))))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (ty3 g c t0 t3)).(\lambda -(H1: ((\forall (c2: C).((csub3 g c c2) \to (ty3 g c2 t0 t3))))).(\lambda (t4: -T).(\lambda (_: (ty3 g c t3 t4)).(\lambda (H3: ((\forall (c2: C).((csub3 g c -c2) \to (ty3 g c2 t3 t4))))).(\lambda (c2: C).(\lambda (H4: (csub3 g c +(H1: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 t0 t3))))).(\lambda (t4: +T).(\lambda (_: (ty3 g c t3 t4)).(\lambda (H3: ((\forall (c2: C).((csubt g c +c2) \to (ty3 g c2 t3 t4))))).(\lambda (c2: C).(\lambda (H4: (csubt g c c2)).(ty3_cast g c2 t0 t3 (H1 c2 H4) t4 (H3 c2 H4)))))))))))) c1 t1 t2 H))))). -theorem csub3_ty3_ld: +theorem csubt_ty3_ld: \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (v: T).((ty3 g c u v) \to (\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c (Bind Abst) v) t1 t2) \to (ty3 g (CHead c (Bind Abbr) u) t1 t2)))))))) \def \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (v: T).(\lambda (H: (ty3 g c u v)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (ty3 g (CHead -c (Bind Abst) v) t1 t2)).(csub3_ty3 g (CHead c (Bind Abst) v) t1 t2 H0 (CHead -c (Bind Abbr) u) (csub3_abst g c c (csub3_refl g c) u v H))))))))). +c (Bind Abst) v) t1 t2)).(csubt_ty3 g (CHead c (Bind Abst) v) t1 t2 H0 (CHead +c (Bind Abbr) u) (csubt_abst g c c (csubt_refl g c) u v H))))))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/defs.ma index 164dab30a..dafc9d015 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/defs.ma @@ -26,12 +26,12 @@ inductive drop1: PList \to (C \to (C \to Prop)) \def nat).((drop h d c1 c2) \to (\forall (c3: C).(\forall (hds: PList).((drop1 hds c2 c3) \to (drop1 (PCons h d hds) c1 c3)))))))). -definition ctrans: - PList \to (nat \to (T \to T)) +definition ptrans: + PList \to (nat \to PList) \def - let rec ctrans (hds: PList) on hds: (nat \to (T \to T)) \def (\lambda (i: -nat).(\lambda (t: T).(match hds with [PNil \Rightarrow t | (PCons h d hds0) -\Rightarrow (let j \def (trans hds0 i) in (let u \def (ctrans hds0 i t) in -(match (blt j d) with [true \Rightarrow (lift h (minus d (S j)) u) | false -\Rightarrow u])))]))) in ctrans. + let rec ptrans (hds: PList) on hds: (nat \to PList) \def (\lambda (i: +nat).(match hds with [PNil \Rightarrow PNil | (PCons h d hds0) \Rightarrow +(let j \def (trans hds0 i) in (let q \def (ptrans hds0 i) in (match (blt j d) +with [true \Rightarrow (PCons h (minus d (S j)) q) | false \Rightarrow +q])))])) in ptrans. diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/getl.ma index 4adda6f18..fd5a2b8be 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/getl.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/getl.ma @@ -23,59 +23,69 @@ include "getl/drop.ma". theorem drop1_getl_trans: \forall (hds: PList).(\forall (c1: C).(\forall (c2: C).((drop1 hds c2 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl -i c1 (CHead e1 (Bind b) v)) \to (ex C (\lambda (e2: C).(getl (trans hds i) c2 -(CHead e2 (Bind b) (ctrans hds i v))))))))))))) +i c1 (CHead e1 (Bind b) v)) \to (ex2 C (\lambda (e2: C).(drop1 (ptrans hds i) +e2 e1)) (\lambda (e2: C).(getl (trans hds i) c2 (CHead e2 (Bind b) (lift1 +(ptrans hds i) v))))))))))))) \def \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).(\forall (c2: C).((drop1 p c2 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to -(ex C (\lambda (e2: C).(getl (trans p i) c2 (CHead e2 (Bind b) (ctrans p i -v)))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c2 -c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: -nat).(\lambda (H0: (getl i c1 (CHead e1 (Bind b) v))).(let H1 \def (match H -in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda -(_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 c1) \to -(ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v))))))))))) with -[(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: -(eq C c c2)).(\lambda (H3: (eq C c c1)).(eq_ind C c2 (\lambda (c0: C).((eq C -c0 c1) \to (ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v)))))) -(\lambda (H4: (eq C c2 c1)).(eq_ind C c1 (\lambda (c0: C).(ex C (\lambda (e2: -C).(getl i c0 (CHead e2 (Bind b) v))))) (ex_intro C (\lambda (e2: C).(getl i -c1 (CHead e2 (Bind b) v))) e1 H0) c2 (sym_eq C c2 c1 H4))) c (sym_eq C c c2 +(ex2 C (\lambda (e2: C).(drop1 (ptrans p i) e2 e1)) (\lambda (e2: C).(getl +(trans p i) c2 (CHead e2 (Bind b) (lift1 (ptrans p i) v)))))))))))))) +(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c2 c1)).(\lambda +(b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl +i c1 (CHead e1 (Bind b) v))).(let H1 \def (match H in drop1 return (\lambda +(p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p c c0)).((eq +PList p PNil) \to ((eq C c c2) \to ((eq C c0 c1) \to (ex2 C (\lambda (e2: +C).(drop1 PNil e2 e1)) (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) +v))))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil +PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c c1)).(eq_ind C c2 +(\lambda (c0: C).((eq C c0 c1) \to (ex2 C (\lambda (e2: C).(drop1 PNil e2 +e1)) (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v)))))) (\lambda (H4: (eq +C c2 c1)).(eq_ind C c1 (\lambda (c0: C).(ex2 C (\lambda (e2: C).(drop1 PNil +e2 e1)) (\lambda (e2: C).(getl i c0 (CHead e2 (Bind b) v))))) (ex_intro2 C +(\lambda (e2: C).(drop1 PNil e2 e1)) (\lambda (e2: C).(getl i c1 (CHead e2 +(Bind b) v))) e1 (drop1_nil e1) H0) c2 (sym_eq C c2 c1 H4))) c (sym_eq C c c2 H2) H3)))) | (drop1_cons c0 c3 h d H1 c4 hds0 H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds0) PNil)).(\lambda (H4: (eq C c0 c2)).(\lambda (H5: (eq C c4 c1)).((let H6 \def (eq_ind PList (PCons h d hds0) (\lambda (e: PList).(match e in PList return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c0 c2) \to ((eq C c4 c1) \to ((drop h d c0 c3) \to ((drop1 -hds0 c3 c4) \to (ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) -v)))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C -c2) (refl_equal C c1))))))))))) (\lambda (h: nat).(\lambda (d: nat).(\lambda -(hds0: PList).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((drop1 hds0 c2 -c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: -nat).((getl i c1 (CHead e1 (Bind b) v)) \to (ex C (\lambda (e2: C).(getl -(trans hds0 i) c2 (CHead e2 (Bind b) (ctrans hds0 i v))))))))))))))).(\lambda -(c1: C).(\lambda (c2: C).(\lambda (H0: (drop1 (PCons h d hds0) c2 -c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: -nat).(\lambda (H1: (getl i c1 (CHead e1 (Bind b) v))).(let H2 \def (match H0 -in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda -(_: (drop1 p c c0)).((eq PList p (PCons h d hds0)) \to ((eq C c c2) \to ((eq -C c0 c1) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with -[true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) -h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true -\Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false -\Rightarrow (ctrans hds0 i v)])))))))))))) with [(drop1_nil c) \Rightarrow -(\lambda (H2: (eq PList PNil (PCons h d hds0))).(\lambda (H3: (eq C c -c2)).(\lambda (H4: (eq C c c1)).((let H5 \def (eq_ind PList PNil (\lambda (e: -PList).(match e in PList return (\lambda (_: PList).Prop) with [PNil -\Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons h d hds0) H2) -in (False_ind ((eq C c c2) \to ((eq C c c1) \to (ex C (\lambda (e2: C).(getl -(match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false -\Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt -(trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) -(ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)]))))))) H5)) H3 -H4)))) | (drop1_cons c0 c3 h0 d0 H2 c4 hds1 H3) \Rightarrow (\lambda (H4: (eq -PList (PCons h0 d0 hds1) (PCons h d hds0))).(\lambda (H5: (eq C c0 +hds0 c3 c4) \to (ex2 C (\lambda (e2: C).(drop1 PNil e2 e1)) (\lambda (e2: +C).(getl i c2 (CHead e2 (Bind b) v)))))))) H6)) H4 H5 H1 H2))))]) in (H1 +(refl_equal PList PNil) (refl_equal C c2) (refl_equal C c1))))))))))) +(\lambda (h: nat).(\lambda (d: nat).(\lambda (hds0: PList).(\lambda (H: +((\forall (c1: C).(\forall (c2: C).((drop1 hds0 c2 c1) \to (\forall (b: +B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 +(Bind b) v)) \to (ex2 C (\lambda (e2: C).(drop1 (ptrans hds0 i) e2 e1)) +(\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (ptrans +hds0 i) v))))))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: +(drop1 (PCons h d hds0) c2 c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: +T).(\lambda (i: nat).(\lambda (H1: (getl i c1 (CHead e1 (Bind b) v))).(let H2 +\def (match H0 in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda +(c0: C).(\lambda (_: (drop1 p c c0)).((eq PList p (PCons h d hds0)) \to ((eq +C c c2) \to ((eq C c0 c1) \to (ex2 C (\lambda (e2: C).(drop1 (match (blt +(trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans hds0 +i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) (\lambda +(e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans +hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) +(lift1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d +(S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) +v)))))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil +(PCons h d hds0))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c +c1)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e in PList +return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) +\Rightarrow False])) I (PCons h d hds0) H2) in (False_ind ((eq C c c2) \to +((eq C c c1) \to (ex2 C (\lambda (e2: C).(drop1 (match (blt (trans hds0 i) d) +with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) +| false \Rightarrow (ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match +(blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false +\Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 (match +(blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans +hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v))))))) +H5)) H3 H4)))) | (drop1_cons c0 c3 h0 d0 H2 c4 hds1 H3) \Rightarrow (\lambda +(H4: (eq PList (PCons h0 d0 hds1) (PCons h d hds0))).(\lambda (H5: (eq C c0 c2)).(\lambda (H6: (eq C c4 c1)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e in PList return (\lambda (_: PList).PList) with [PNil \Rightarrow hds1 | (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds1) (PCons h @@ -86,74 +96,101 @@ n _) \Rightarrow n])) (PCons h0 d0 hds1) (PCons h d hds0) H4) in ((let H9 (_: PList).nat) with [PNil \Rightarrow h0 | (PCons n _ _) \Rightarrow n])) (PCons h0 d0 hds1) (PCons h d hds0) H4) in (eq_ind nat h (\lambda (n: nat).((eq nat d0 d) \to ((eq PList hds1 hds0) \to ((eq C c0 c2) \to ((eq C c4 -c1) \to ((drop n d0 c0 c3) \to ((drop1 hds1 c3 c4) \to (ex C (\lambda (e2: +c1) \to ((drop n d0 c0 c3) \to ((drop1 hds1 c3 c4) \to (ex2 C (\lambda (e2: +C).(drop1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h +(minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans +hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with +[true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) +h)]) c2 (CHead e2 (Bind b) (lift1 (match (blt (trans hds0 i) d) with [true +\Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false +\Rightarrow (ptrans hds0 i)]) v)))))))))))) (\lambda (H10: (eq nat d0 +d)).(eq_ind nat d (\lambda (n: nat).((eq PList hds1 hds0) \to ((eq C c0 c2) +\to ((eq C c4 c1) \to ((drop h n c0 c3) \to ((drop1 hds1 c3 c4) \to (ex2 C +(\lambda (e2: C).(drop1 (match (blt (trans hds0 i) d) with [true \Rightarrow +(PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow +(ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match (blt (trans hds0 i) +d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans +hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 (match (blt (trans hds0 i) d) with +[true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | +false \Rightarrow (ptrans hds0 i)]) v))))))))))) (\lambda (H11: (eq PList +hds1 hds0)).(eq_ind PList hds0 (\lambda (p: PList).((eq C c0 c2) \to ((eq C +c4 c1) \to ((drop h d c0 c3) \to ((drop1 p c3 c4) \to (ex2 C (\lambda (e2: +C).(drop1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h +(minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans +hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with +[true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) +h)]) c2 (CHead e2 (Bind b) (lift1 (match (blt (trans hds0 i) d) with [true +\Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false +\Rightarrow (ptrans hds0 i)]) v)))))))))) (\lambda (H12: (eq C c0 +c2)).(eq_ind C c2 (\lambda (c: C).((eq C c4 c1) \to ((drop h d c c3) \to +((drop1 hds0 c3 c4) \to (ex2 C (\lambda (e2: C).(drop1 (match (blt (trans +hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) +(ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) -| false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match -(blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 -i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))))))))) -(\lambda (H10: (eq nat d0 d)).(eq_ind nat d (\lambda (n: nat).((eq PList hds1 -hds0) \to ((eq C c0 c2) \to ((eq C c4 c1) \to ((drop h n c0 c3) \to ((drop1 -hds1 c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) -with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 -i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true -\Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false -\Rightarrow (ctrans hds0 i v)]))))))))))) (\lambda (H11: (eq PList hds1 -hds0)).(eq_ind PList hds0 (\lambda (p: PList).((eq C c0 c2) \to ((eq C c4 c1) -\to ((drop h d c0 c3) \to ((drop1 p c3 c4) \to (ex C (\lambda (e2: C).(getl -(match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false -\Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt -(trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) -(ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))))))) (\lambda -(H12: (eq C c0 c2)).(eq_ind C c2 (\lambda (c: C).((eq C c4 c1) \to ((drop h d -c c3) \to ((drop1 hds0 c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt -(trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow -(plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) -with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i -v)) | false \Rightarrow (ctrans hds0 i v)]))))))))) (\lambda (H13: (eq C c4 -c1)).(eq_ind C c1 (\lambda (c: C).((drop h d c2 c3) \to ((drop1 hds0 c3 c) -\to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true -\Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 -(CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift -h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans -hds0 i v)])))))))) (\lambda (H14: (drop h d c2 c3)).(\lambda (H15: (drop1 -hds0 c3 c1)).(xinduction bool (blt (trans hds0 i) d) (\lambda (b0: bool).(ex -C (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i) | -false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match b0 -with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i -v)) | false \Rightarrow (ctrans hds0 i v)])))))) (\lambda (x_x: +| false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 +(match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S +(trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) +v))))))))) (\lambda (H13: (eq C c4 c1)).(eq_ind C c1 (\lambda (c: C).((drop h +d c2 c3) \to ((drop1 hds0 c3 c) \to (ex2 C (\lambda (e2: C).(drop1 (match +(blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans +hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) +(\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow +(trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 +(Bind b) (lift1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h +(minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans +hds0 i)]) v)))))))) (\lambda (H14: (drop h d c2 c3)).(\lambda (H15: (drop1 +hds0 c3 c1)).(xinduction bool (blt (trans hds0 i) d) (\lambda (b0: bool).(ex2 +C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow (PCons h (minus d +(S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 +e1)) (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i) | +false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 +(match b0 with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) +(ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v)))))) (\lambda (x_x: bool).(bool_ind (\lambda (b0: bool).((eq bool (blt (trans hds0 i) d) b0) \to -(ex C (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i) -| false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match b0 -with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i -v)) | false \Rightarrow (ctrans hds0 i v)]))))))) (\lambda (H16: (eq bool -(blt (trans hds0 i) d) true)).(let H_x \def (H c1 c3 H15 b e1 v i H1) in (let -H17 \def H_x in (ex_ind C (\lambda (e2: C).(getl (trans hds0 i) c3 (CHead e2 -(Bind b) (ctrans hds0 i v)))) (ex C (\lambda (e2: C).(getl (trans hds0 i) c2 -(CHead e2 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i -v)))))) (\lambda (x: C).(\lambda (H18: (getl (trans hds0 i) c3 (CHead x (Bind -b) (ctrans hds0 i v)))).(let H_x0 \def (drop_getl_trans_lt (trans hds0 i) d -(le_S_n (S (trans hds0 i)) d (lt_le_S (S (trans hds0 i)) (S d) (blt_lt (S d) -(S (trans hds0 i)) H16))) c2 c3 h H14 b x (ctrans hds0 i v) H18) in (let H19 -\def H_x0 in (ex2_ind C (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 -(Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v))))) (\lambda -(e2: C).(drop h (minus d (S (trans hds0 i))) e2 x)) (ex C (\lambda (e2: -C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0 -i))) (ctrans hds0 i v)))))) (\lambda (x0: C).(\lambda (H20: (getl (trans hds0 -i) c2 (CHead x0 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i -v))))).(\lambda (_: (drop h (minus d (S (trans hds0 i))) x0 x)).(ex_intro C -(\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d -(S (trans hds0 i))) (ctrans hds0 i v))))) x0 H20)))) H19))))) H17)))) -(\lambda (H16: (eq bool (blt (trans hds0 i) d) false)).(let H_x \def (H c1 c3 -H15 b e1 v i H1) in (let H17 \def H_x in (ex_ind C (\lambda (e2: C).(getl -(trans hds0 i) c3 (CHead e2 (Bind b) (ctrans hds0 i v)))) (ex C (\lambda (e2: -C).(getl (plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (ctrans hds0 i v))))) -(\lambda (x: C).(\lambda (H18: (getl (trans hds0 i) c3 (CHead x (Bind b) -(ctrans hds0 i v)))).(let H19 \def (drop_getl_trans_ge (trans hds0 i) c2 c3 d -h H14 (CHead x (Bind b) (ctrans hds0 i v)) H18) in (ex_intro C (\lambda (e2: -C).(getl (plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (ctrans hds0 i v)))) x -(H19 (bge_le d (trans hds0 i) H16)))))) H17)))) x_x))))) c4 (sym_eq C c4 c1 -H13))) c0 (sym_eq C c0 c2 H12))) hds1 (sym_eq PList hds1 hds0 H11))) d0 -(sym_eq nat d0 d H10))) h0 (sym_eq nat h0 h H9))) H8)) H7)) H5 H6 H2 H3))))]) -in (H2 (refl_equal PList (PCons h d hds0)) (refl_equal C c2) (refl_equal C -c1))))))))))))))) hds). +(ex2 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow (PCons h +(minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans +hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match b0 with [true \Rightarrow +(trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 +(Bind b) (lift1 (match b0 with [true \Rightarrow (PCons h (minus d (S (trans +hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v))))))) +(\lambda (H16: (eq bool (blt (trans hds0 i) d) true)).(let H_x \def (H c1 c3 +H15 b e1 v i H1) in (let H17 \def H_x in (ex2_ind C (\lambda (e2: C).(drop1 +(ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c3 (CHead e2 +(Bind b) (lift1 (ptrans hds0 i) v)))) (ex2 C (\lambda (e2: C).(drop1 (PCons h +(minus d (S (trans hds0 i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl +(trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (PCons h (minus d (S (trans hds0 +i))) (ptrans hds0 i)) v))))) (\lambda (x: C).(\lambda (H18: (drop1 (ptrans +hds0 i) x e1)).(\lambda (H19: (getl (trans hds0 i) c3 (CHead x (Bind b) +(lift1 (ptrans hds0 i) v)))).(let H_x0 \def (drop_getl_trans_lt (trans hds0 +i) d (le_S_n (S (trans hds0 i)) d (lt_le_S (S (trans hds0 i)) (S d) (blt_lt +(S d) (S (trans hds0 i)) H16))) c2 c3 h H14 b x (lift1 (ptrans hds0 i) v) +H19) in (let H20 \def H_x0 in (ex2_ind C (\lambda (e2: C).(getl (trans hds0 +i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0 i))) (lift1 (ptrans +hds0 i) v))))) (\lambda (e2: C).(drop h (minus d (S (trans hds0 i))) e2 x)) +(ex2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S (trans hds0 i))) (ptrans +hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) +(lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) v))))) (\lambda +(x0: C).(\lambda (H21: (getl (trans hds0 i) c2 (CHead x0 (Bind b) (lift h +(minus d (S (trans hds0 i))) (lift1 (ptrans hds0 i) v))))).(\lambda (H22: +(drop h (minus d (S (trans hds0 i))) x0 x)).(ex_intro2 C (\lambda (e2: +C).(drop1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) e2 e1)) +(\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (PCons h +(minus d (S (trans hds0 i))) (ptrans hds0 i)) v)))) x0 (drop1_cons x0 x h +(minus d (S (trans hds0 i))) H22 e1 (ptrans hds0 i) H18) H21)))) H20)))))) +H17)))) (\lambda (H16: (eq bool (blt (trans hds0 i) d) false)).(let H_x \def +(H c1 c3 H15 b e1 v i H1) in (let H17 \def H_x in (ex2_ind C (\lambda (e2: +C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c3 +(CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) (ex2 C (\lambda (e2: +C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (plus (trans hds0 i) +h) c2 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v))))) (\lambda (x: +C).(\lambda (H18: (drop1 (ptrans hds0 i) x e1)).(\lambda (H19: (getl (trans +hds0 i) c3 (CHead x (Bind b) (lift1 (ptrans hds0 i) v)))).(let H20 \def +(drop_getl_trans_ge (trans hds0 i) c2 c3 d h H14 (CHead x (Bind b) (lift1 +(ptrans hds0 i) v)) H19) in (ex_intro2 C (\lambda (e2: C).(drop1 (ptrans hds0 +i) e2 e1)) (\lambda (e2: C).(getl (plus (trans hds0 i) h) c2 (CHead e2 (Bind +b) (lift1 (ptrans hds0 i) v)))) x H18 (H20 (bge_le d (trans hds0 i) +H16))))))) H17)))) x_x))))) c4 (sym_eq C c4 c1 H13))) c0 (sym_eq C c0 c2 +H12))) hds1 (sym_eq PList hds1 hds0 H11))) d0 (sym_eq nat d0 d H10))) h0 +(sym_eq nat h0 h H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList +(PCons h d hds0)) (refl_equal C c2) (refl_equal C c1))))))))))))))) hds). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/props.ma index dc61e4c29..ee7723013 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/props.ma @@ -163,3 +163,72 @@ PList hds0 p H11))) d0 (sym_eq nat d0 n0 H10))) h0 (sym_eq nat h0 n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c1) (refl_equal C c2))))))))) hds)))))). +theorem drop1_trans: + \forall (is1: PList).(\forall (c1: C).(\forall (c0: C).((drop1 is1 c1 c0) +\to (\forall (is2: PList).(\forall (c2: C).((drop1 is2 c0 c2) \to (drop1 +(papp is1 is2) c1 c2))))))) +\def + \lambda (is1: PList).(PList_ind (\lambda (p: PList).(\forall (c1: +C).(\forall (c0: C).((drop1 p c1 c0) \to (\forall (is2: PList).(\forall (c2: +C).((drop1 is2 c0 c2) \to (drop1 (papp p is2) c1 c2)))))))) (\lambda (c1: +C).(\lambda (c0: C).(\lambda (H: (drop1 PNil c1 c0)).(\lambda (is2: +PList).(\lambda (c2: C).(\lambda (H0: (drop1 is2 c0 c2)).(let H1 \def (match +H in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c3: +C).(\lambda (_: (drop1 p c c3)).((eq PList p PNil) \to ((eq C c c1) \to ((eq +C c3 c0) \to (drop1 is2 c1 c2)))))))) with [(drop1_nil c) \Rightarrow +(\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c1)).(\lambda (H3: +(eq C c c0)).(eq_ind C c1 (\lambda (c3: C).((eq C c3 c0) \to (drop1 is2 c1 +c2))) (\lambda (H4: (eq C c1 c0)).(eq_ind C c0 (\lambda (c3: C).(drop1 is2 c3 +c2)) (let H5 \def (eq_ind_r C c0 (\lambda (c3: C).(drop1 is2 c3 c2)) H0 c1 +H4) in (eq_ind C c1 (\lambda (c3: C).(drop1 is2 c3 c2)) H5 c0 H4)) c1 (sym_eq +C c1 c0 H4))) c (sym_eq C c c1 H2) H3)))) | (drop1_cons c3 c4 h d H1 c5 hds +H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: +(eq C c3 c1)).(\lambda (H5: (eq C c5 c0)).((let H6 \def (eq_ind PList (PCons +h d hds) (\lambda (e: PList).(match e in PList return (\lambda (_: +PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) +I PNil H3) in (False_ind ((eq C c3 c1) \to ((eq C c5 c0) \to ((drop h d c3 +c4) \to ((drop1 hds c4 c5) \to (drop1 is2 c1 c2))))) H6)) H4 H5 H1 H2))))]) +in (H1 (refl_equal PList PNil) (refl_equal C c1) (refl_equal C c0))))))))) +(\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: +((\forall (c1: C).(\forall (c0: C).((drop1 p c1 c0) \to (\forall (is2: +PList).(\forall (c2: C).((drop1 is2 c0 c2) \to (drop1 (papp p is2) c1 +c2))))))))).(\lambda (c1: C).(\lambda (c0: C).(\lambda (H0: (drop1 (PCons n +n0 p) c1 c0)).(\lambda (is2: PList).(\lambda (c2: C).(\lambda (H1: (drop1 is2 +c0 c2)).(let H2 \def (match H0 in drop1 return (\lambda (p0: PList).(\lambda +(c: C).(\lambda (c3: C).(\lambda (_: (drop1 p0 c c3)).((eq PList p0 (PCons n +n0 p)) \to ((eq C c c1) \to ((eq C c3 c0) \to (drop1 (PCons n n0 (papp p +is2)) c1 c2)))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList +PNil (PCons n n0 p))).(\lambda (H3: (eq C c c1)).(\lambda (H4: (eq C c +c0)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e in PList +return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) +\Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c1) \to ((eq +C c c0) \to (drop1 (PCons n n0 (papp p is2)) c1 c2))) H5)) H3 H4)))) | +(drop1_cons c3 c4 h d H2 c5 hds H3) \Rightarrow (\lambda (H4: (eq PList +(PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c3 c1)).(\lambda (H6: +(eq C c5 c0)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e +in PList return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | +(PCons _ _ p0) \Rightarrow p0])) (PCons h d hds) (PCons n n0 p) H4) in ((let +H8 \def (f_equal PList nat (\lambda (e: PList).(match e in PList return +(\lambda (_: PList).nat) with [PNil \Rightarrow d | (PCons _ n1 _) +\Rightarrow n1])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def +(f_equal PList nat (\lambda (e: PList).(match e in PList return (\lambda (_: +PList).nat) with [PNil \Rightarrow h | (PCons n1 _ _) \Rightarrow n1])) +(PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq +nat d n0) \to ((eq PList hds p) \to ((eq C c3 c1) \to ((eq C c5 c0) \to +((drop n1 d c3 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (papp p +is2)) c1 c2)))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda +(n1: nat).((eq PList hds p) \to ((eq C c3 c1) \to ((eq C c5 c0) \to ((drop n +n1 c3 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (papp p is2)) c1 +c2))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: +PList).((eq C c3 c1) \to ((eq C c5 c0) \to ((drop n n0 c3 c4) \to ((drop1 p0 +c4 c5) \to (drop1 (PCons n n0 (papp p is2)) c1 c2)))))) (\lambda (H12: (eq C +c3 c1)).(eq_ind C c1 (\lambda (c: C).((eq C c5 c0) \to ((drop n n0 c c4) \to +((drop1 p c4 c5) \to (drop1 (PCons n n0 (papp p is2)) c1 c2))))) (\lambda +(H13: (eq C c5 c0)).(eq_ind C c0 (\lambda (c: C).((drop n n0 c1 c4) \to +((drop1 p c4 c) \to (drop1 (PCons n n0 (papp p is2)) c1 c2)))) (\lambda (H14: +(drop n n0 c1 c4)).(\lambda (H15: (drop1 p c4 c0)).(drop1_cons c1 c4 n n0 H14 +c2 (papp p is2) (H c4 c0 H15 is2 c2 H1)))) c5 (sym_eq C c5 c0 H13))) c3 +(sym_eq C c3 c1 H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 +H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal +PList (PCons n n0 p)) (refl_equal C c1) (refl_equal C c0))))))))))))) is1). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/defs.ma index 71ccebcd6..f5f76deec 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/defs.ma @@ -20,7 +20,7 @@ include "csubst0/defs.ma". include "subst0/defs.ma". -inductive fsubst0 (i:nat) (v:T) (c1:C) (t1:T): C \to (T \to Prop) \def +inductive fsubst0 (i: nat) (v: T) (c1: C) (t1: T): C \to (T \to Prop) \def | fsubst0_snd: \forall (t2: T).((subst0 i v t1 t2) \to (fsubst0 i v c1 t1 c1 t2)) | fsubst0_fst: \forall (c2: C).((csubst0 i v c1 c2) \to (fsubst0 i v c1 t1 c2 diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/defs.ma index 40845209b..8c40f8832 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/defs.ma @@ -20,7 +20,7 @@ include "drop/defs.ma". include "clear/defs.ma". -inductive getl (h:nat) (c1:C) (c2:C): Prop \def +inductive getl (h: nat) (c1: C) (c2: C): Prop \def | getl_intro: \forall (e: C).((drop h O c1 e) \to ((clear e c2) \to (getl h c1 c2))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/fwd.ma index 9402e8cbf..61a965d15 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/fwd.ma @@ -18,6 +18,8 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/iso/fwd". include "iso/defs.ma". +include "tlist/defs.ma". + theorem iso_flats_lref_bind_false: \forall (f: F).(\forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (t: T).(\forall (vs: TList).((iso (THeads (Flat f) vs (TLRef i)) (THead (Bind diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/defs.ma index 8015e7132..51db1202c 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/defs.ma @@ -18,7 +18,7 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/leq/defs". include "aplus/defs.ma". -inductive leq (g:G): A \to (A \to Prop) \def +inductive leq (g: G): A \to (A \to Prop) \def | leq_sort: \forall (h1: nat).(\forall (h2: nat).(\forall (n1: nat).(\forall (n2: nat).(\forall (k: nat).((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort h1 n1) (ASort h2 n2))))))) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/defs.ma index 41c5d1e46..66b000e77 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/defs.ma @@ -18,6 +18,8 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/defs". include "T/defs.ma". +include "tlist/defs.ma". + include "s/defs.ma". definition lref_map: diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/props.ma index 3e2301883..8987e40f0 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/props.ma @@ -16,6 +16,8 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/props". +include "tlist/defs.ma". + include "lift/fwd.ma". include "s/props.ma". @@ -116,6 +118,20 @@ theorem lift_lref_gt: (pred n) (eq_ind nat n (\lambda (n0: nat).(le (S d) n0)) H (S (pred n)) (S_pred n d H))))))). +theorem lifts_tapp: + \forall (h: nat).(\forall (d: nat).(\forall (v: T).(\forall (vs: TList).(eq +TList (lifts h d (TApp vs v)) (TApp (lifts h d vs) (lift h d v)))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (v: T).(\lambda (vs: +TList).(TList_ind (\lambda (t: TList).(eq TList (lifts h d (TApp t v)) (TApp +(lifts h d t) (lift h d v)))) (refl_equal TList (TCons (lift h d v) TNil)) +(\lambda (t: T).(\lambda (t0: TList).(\lambda (H: (eq TList (lifts h d (TApp +t0 v)) (TApp (lifts h d t0) (lift h d v)))).(eq_ind_r TList (TApp (lifts h d +t0) (lift h d v)) (\lambda (t1: TList).(eq TList (TCons (lift h d t) t1) +(TCons (lift h d t) (TApp (lifts h d t0) (lift h d v))))) (refl_equal TList +(TCons (lift h d t) (TApp (lifts h d t0) (lift h d v)))) (lifts h d (TApp t0 +v)) H)))) vs)))). + theorem lift_inj: \forall (x: T).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d x) (lift h d t)) \to (eq T x t))))) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/fwd.ma index 4b548cbff..8400f1f34 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/fwd.ma @@ -20,20 +20,28 @@ include "lift1/defs.ma". include "lift/fwd.ma". +theorem lift1_sort: + \forall (n: nat).(\forall (is: PList).(eq T (lift1 is (TSort n)) (TSort n))) +\def + \lambda (n: nat).(\lambda (is: PList).(PList_ind (\lambda (p: PList).(eq T +(lift1 p (TSort n)) (TSort n))) (refl_equal T (TSort n)) (\lambda (n0: +nat).(\lambda (n1: nat).(\lambda (p: PList).(\lambda (H: (eq T (lift1 p +(TSort n)) (TSort n))).(eq_ind_r T (TSort n) (\lambda (t: T).(eq T (lift n0 +n1 t) (TSort n))) (refl_equal T (TSort n)) (lift1 p (TSort n)) H))))) is)). + theorem lift1_lref: \forall (hds: PList).(\forall (i: nat).(eq T (lift1 hds (TLRef i)) (TLRef (trans hds i)))) \def \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (i: nat).(eq T (lift1 p (TLRef i)) (TLRef (trans p i))))) (\lambda (i: nat).(refl_equal T -(TLRef (trans PNil i)))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (p: -PList).(\lambda (H: ((\forall (i: nat).(eq T (lift1 p (TLRef i)) (TLRef -(trans p i)))))).(\lambda (i: nat).(eq_ind_r T (TLRef (trans p i)) (\lambda -(t: T).(eq T (lift h d t) (TLRef (match (blt (trans p i) d) with [true -\Rightarrow (trans p i) | false \Rightarrow (plus (trans p i) h)])))) -(refl_equal T (TLRef (match (blt (trans p i) d) with [true \Rightarrow (trans -p i) | false \Rightarrow (plus (trans p i) h)]))) (lift1 p (TLRef i)) (H -i))))))) hds). +(TLRef i))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda +(H: ((\forall (i: nat).(eq T (lift1 p (TLRef i)) (TLRef (trans p +i)))))).(\lambda (i: nat).(eq_ind_r T (TLRef (trans p i)) (\lambda (t: T).(eq +T (lift n n0 t) (TLRef (match (blt (trans p i) n0) with [true \Rightarrow +(trans p i) | false \Rightarrow (plus (trans p i) n)])))) (refl_equal T +(TLRef (match (blt (trans p i) n0) with [true \Rightarrow (trans p i) | false +\Rightarrow (plus (trans p i) n)]))) (lift1 p (TLRef i)) (H i))))))) hds). theorem lift1_bind: \forall (b: B).(\forall (hds: PList).(\forall (u: T).(\forall (t: T).(eq T @@ -43,18 +51,18 @@ hds) t)))))) \lambda (b: B).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead (Bind b) u t)) (THead (Bind b) (lift1 p u) (lift1 (Ss p) t)))))) (\lambda (u: T).(\lambda (t: T).(refl_equal -T (THead (Bind b) (lift1 PNil u) (lift1 (Ss PNil) t))))) (\lambda (h: -nat).(\lambda (d: nat).(\lambda (p: PList).(\lambda (H: ((\forall (u: -T).(\forall (t: T).(eq T (lift1 p (THead (Bind b) u t)) (THead (Bind b) -(lift1 p u) (lift1 (Ss p) t))))))).(\lambda (u: T).(\lambda (t: T).(eq_ind_r -T (THead (Bind b) (lift1 p u) (lift1 (Ss p) t)) (\lambda (t0: T).(eq T (lift -h d t0) (THead (Bind b) (lift h d (lift1 p u)) (lift h (S d) (lift1 (Ss p) -t))))) (eq_ind_r T (THead (Bind b) (lift h d (lift1 p u)) (lift h (S d) -(lift1 (Ss p) t))) (\lambda (t0: T).(eq T t0 (THead (Bind b) (lift h d (lift1 -p u)) (lift h (S d) (lift1 (Ss p) t))))) (refl_equal T (THead (Bind b) (lift -h d (lift1 p u)) (lift h (S d) (lift1 (Ss p) t)))) (lift h d (THead (Bind b) -(lift1 p u) (lift1 (Ss p) t))) (lift_bind b (lift1 p u) (lift1 (Ss p) t) h -d)) (lift1 p (THead (Bind b) u t)) (H u t)))))))) hds)). +T (THead (Bind b) u t)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: +PList).(\lambda (H: ((\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead +(Bind b) u t)) (THead (Bind b) (lift1 p u) (lift1 (Ss p) t))))))).(\lambda +(u: T).(\lambda (t: T).(eq_ind_r T (THead (Bind b) (lift1 p u) (lift1 (Ss p) +t)) (\lambda (t0: T).(eq T (lift n n0 t0) (THead (Bind b) (lift n n0 (lift1 p +u)) (lift n (S n0) (lift1 (Ss p) t))))) (eq_ind_r T (THead (Bind b) (lift n +n0 (lift1 p u)) (lift n (S n0) (lift1 (Ss p) t))) (\lambda (t0: T).(eq T t0 +(THead (Bind b) (lift n n0 (lift1 p u)) (lift n (S n0) (lift1 (Ss p) t))))) +(refl_equal T (THead (Bind b) (lift n n0 (lift1 p u)) (lift n (S n0) (lift1 +(Ss p) t)))) (lift n n0 (THead (Bind b) (lift1 p u) (lift1 (Ss p) t))) +(lift_bind b (lift1 p u) (lift1 (Ss p) t) n n0)) (lift1 p (THead (Bind b) u +t)) (H u t)))))))) hds)). theorem lift1_flat: \forall (f: F).(\forall (hds: PList).(\forall (u: T).(\forall (t: T).(eq T @@ -64,17 +72,17 @@ t)))))) \lambda (f: F).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead (Flat f) u t)) (THead (Flat f) (lift1 p u) (lift1 p t)))))) (\lambda (u: T).(\lambda (t: T).(refl_equal T -(THead (Flat f) (lift1 PNil u) (lift1 PNil t))))) (\lambda (h: nat).(\lambda -(d: nat).(\lambda (p: PList).(\lambda (H: ((\forall (u: T).(\forall (t: -T).(eq T (lift1 p (THead (Flat f) u t)) (THead (Flat f) (lift1 p u) (lift1 p -t))))))).(\lambda (u: T).(\lambda (t: T).(eq_ind_r T (THead (Flat f) (lift1 p -u) (lift1 p t)) (\lambda (t0: T).(eq T (lift h d t0) (THead (Flat f) (lift h -d (lift1 p u)) (lift h d (lift1 p t))))) (eq_ind_r T (THead (Flat f) (lift h -d (lift1 p u)) (lift h d (lift1 p t))) (\lambda (t0: T).(eq T t0 (THead (Flat -f) (lift h d (lift1 p u)) (lift h d (lift1 p t))))) (refl_equal T (THead -(Flat f) (lift h d (lift1 p u)) (lift h d (lift1 p t)))) (lift h d (THead -(Flat f) (lift1 p u) (lift1 p t))) (lift_flat f (lift1 p u) (lift1 p t) h d)) -(lift1 p (THead (Flat f) u t)) (H u t)))))))) hds)). +(THead (Flat f) u t)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: +PList).(\lambda (H: ((\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead +(Flat f) u t)) (THead (Flat f) (lift1 p u) (lift1 p t))))))).(\lambda (u: +T).(\lambda (t: T).(eq_ind_r T (THead (Flat f) (lift1 p u) (lift1 p t)) +(\lambda (t0: T).(eq T (lift n n0 t0) (THead (Flat f) (lift n n0 (lift1 p u)) +(lift n n0 (lift1 p t))))) (eq_ind_r T (THead (Flat f) (lift n n0 (lift1 p +u)) (lift n n0 (lift1 p t))) (\lambda (t0: T).(eq T t0 (THead (Flat f) (lift +n n0 (lift1 p u)) (lift n n0 (lift1 p t))))) (refl_equal T (THead (Flat f) +(lift n n0 (lift1 p u)) (lift n n0 (lift1 p t)))) (lift n n0 (THead (Flat f) +(lift1 p u) (lift1 p t))) (lift_flat f (lift1 p u) (lift1 p t) n n0)) (lift1 +p (THead (Flat f) u t)) (H u t)))))))) hds)). theorem lift1_cons_tail: \forall (t: T).(\forall (h: nat).(\forall (d: nat).(\forall (hds: PList).(eq diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/props.ma index eeec1fc7d..5b92ff26a 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/props.ma @@ -22,6 +22,23 @@ include "lift/props.ma". include "drop1/defs.ma". +theorem lift1_lift1: + \forall (is1: PList).(\forall (is2: PList).(\forall (t: T).(eq T (lift1 is1 +(lift1 is2 t)) (lift1 (papp is1 is2) t)))) +\def + \lambda (is1: PList).(PList_ind (\lambda (p: PList).(\forall (is2: +PList).(\forall (t: T).(eq T (lift1 p (lift1 is2 t)) (lift1 (papp p is2) +t))))) (\lambda (is2: PList).(\lambda (t: T).(refl_equal T (lift1 is2 t)))) +(\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: +((\forall (is2: PList).(\forall (t: T).(eq T (lift1 p (lift1 is2 t)) (lift1 +(papp p is2) t)))))).(\lambda (is2: PList).(\lambda (t: T).(sym_eq T (lift n +n0 (lift1 (papp p is2) t)) (lift n n0 (lift1 p (lift1 is2 t))) (sym_eq T +(lift n n0 (lift1 p (lift1 is2 t))) (lift n n0 (lift1 (papp p is2) t)) +(sym_eq T (lift n n0 (lift1 (papp p is2) t)) (lift n n0 (lift1 p (lift1 is2 +t))) (f_equal3 nat nat T T lift n n n0 n0 (lift1 (papp p is2) t) (lift1 p +(lift1 is2 t)) (refl_equal nat n) (refl_equal nat n0) (sym_eq T (lift1 p +(lift1 is2 t)) (lift1 (papp p is2) t) (H is2 t)))))))))))) is1). + theorem lift1_xhg: \forall (hds: PList).(\forall (t: T).(eq T (lift1 (Ss hds) (lift (S O) O t)) (lift (S O) O (lift1 hds t)))) @@ -59,57 +76,60 @@ t0))))) (refl_equal TList (TCons (lift (S O) O (lift1 hds t)) (lifts (S O) O theorem lift1_free: \forall (hds: PList).(\forall (i: nat).(\forall (t: T).(eq T (lift1 hds -(lift (S i) O t)) (lift (S (trans hds i)) O (ctrans hds i t))))) +(lift (S i) O t)) (lift (S (trans hds i)) O (lift1 (ptrans hds i) t))))) \def \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (i: nat).(\forall (t: T).(eq T (lift1 p (lift (S i) O t)) (lift (S (trans p i)) O -(ctrans p i t)))))) (\lambda (i: nat).(\lambda (t: T).(refl_equal T (lift (S -i) O t)))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (hds0: +(lift1 (ptrans p i) t)))))) (\lambda (i: nat).(\lambda (t: T).(refl_equal T +(lift (S i) O t)))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (hds0: PList).(\lambda (H: ((\forall (i: nat).(\forall (t: T).(eq T (lift1 hds0 -(lift (S i) O t)) (lift (S (trans hds0 i)) O (ctrans hds0 i t))))))).(\lambda -(i: nat).(\lambda (t: T).(eq_ind_r T (lift (S (trans hds0 i)) O (ctrans hds0 -i t)) (\lambda (t0: T).(eq T (lift h d t0) (lift (S (match (blt (trans hds0 -i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans -hds0 i) h)])) O (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h -(minus d (S (trans hds0 i))) (ctrans hds0 i t)) | false \Rightarrow (ctrans -hds0 i t)])))) (xinduction bool (blt (trans hds0 i) d) (\lambda (b: bool).(eq -T (lift h d (lift (S (trans hds0 i)) O (ctrans hds0 i t))) (lift (S (match b -with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 -i) h)])) O (match b with [true \Rightarrow (lift h (minus d (S (trans hds0 -i))) (ctrans hds0 i t)) | false \Rightarrow (ctrans hds0 i t)])))) (\lambda -(x_x: bool).(bool_ind (\lambda (b: bool).((eq bool (blt (trans hds0 i) d) b) -\to (eq T (lift h d (lift (S (trans hds0 i)) O (ctrans hds0 i t))) (lift (S -(match b with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus -(trans hds0 i) h)])) O (match b with [true \Rightarrow (lift h (minus d (S -(trans hds0 i))) (ctrans hds0 i t)) | false \Rightarrow (ctrans hds0 i -t)]))))) (\lambda (H0: (eq bool (blt (trans hds0 i) d) true)).(eq_ind_r nat -(plus (S (trans hds0 i)) (minus d (S (trans hds0 i)))) (\lambda (n: nat).(eq -T (lift h n (lift (S (trans hds0 i)) O (ctrans hds0 i t))) (lift (S (trans -hds0 i)) O (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i t))))) +(lift (S i) O t)) (lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) +t))))))).(\lambda (i: nat).(\lambda (t: T).(eq_ind_r T (lift (S (trans hds0 +i)) O (lift1 (ptrans hds0 i) t)) (\lambda (t0: T).(eq T (lift h d t0) (lift +(S (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | +false \Rightarrow (plus (trans hds0 i) h)])) O (lift1 (match (blt (trans hds0 +i) d) with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans +hds0 i)) | false \Rightarrow (ptrans hds0 i)]) t)))) (xinduction bool (blt +(trans hds0 i) d) (\lambda (b: bool).(eq T (lift h d (lift (S (trans hds0 i)) +O (lift1 (ptrans hds0 i) t))) (lift (S (match b with [true \Rightarrow (trans +hds0 i) | false \Rightarrow (plus (trans hds0 i) h)])) O (lift1 (match b with +[true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | +false \Rightarrow (ptrans hds0 i)]) t)))) (\lambda (x_x: bool).(bool_ind +(\lambda (b: bool).((eq bool (blt (trans hds0 i) d) b) \to (eq T (lift h d +(lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) t))) (lift (S (match b with +[true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) +h)])) O (lift1 (match b with [true \Rightarrow (PCons h (minus d (S (trans +hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) t))))) +(\lambda (H0: (eq bool (blt (trans hds0 i) d) true)).(eq_ind_r nat (plus (S +(trans hds0 i)) (minus d (S (trans hds0 i)))) (\lambda (n: nat).(eq T (lift h +n (lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) t))) (lift (S (trans hds0 +i)) O (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) t)))) (eq_ind_r T (lift (S (trans hds0 i)) O (lift h (minus d (S (trans hds0 i))) -(ctrans hds0 i t))) (\lambda (t0: T).(eq T t0 (lift (S (trans hds0 i)) O -(lift h (minus d (S (trans hds0 i))) (ctrans hds0 i t))))) (refl_equal T -(lift (S (trans hds0 i)) O (lift h (minus d (S (trans hds0 i))) (ctrans hds0 -i t)))) (lift h (plus (S (trans hds0 i)) (minus d (S (trans hds0 i)))) (lift -(S (trans hds0 i)) O (ctrans hds0 i t))) (lift_d (ctrans hds0 i t) h (S -(trans hds0 i)) (minus d (S (trans hds0 i))) O (le_O_n (minus d (S (trans -hds0 i)))))) d (le_plus_minus (S (trans hds0 i)) d (bge_le (S (trans hds0 i)) -d (le_bge (S (trans hds0 i)) d (lt_le_S (trans hds0 i) d (blt_lt d (trans -hds0 i) H0))))))) (\lambda (H0: (eq bool (blt (trans hds0 i) d) -false)).(eq_ind_r T (lift (plus h (S (trans hds0 i))) O (ctrans hds0 i t)) -(\lambda (t0: T).(eq T t0 (lift (S (plus (trans hds0 i) h)) O (ctrans hds0 i -t)))) (eq_ind nat (S (plus h (trans hds0 i))) (\lambda (n: nat).(eq T (lift n -O (ctrans hds0 i t)) (lift (S (plus (trans hds0 i) h)) O (ctrans hds0 i t)))) +(lift1 (ptrans hds0 i) t))) (\lambda (t0: T).(eq T t0 (lift (S (trans hds0 +i)) O (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) t)))) +(refl_equal T (lift (S (trans hds0 i)) O (lift1 (PCons h (minus d (S (trans +hds0 i))) (ptrans hds0 i)) t))) (lift h (plus (S (trans hds0 i)) (minus d (S +(trans hds0 i)))) (lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) t))) +(lift_d (lift1 (ptrans hds0 i) t) h (S (trans hds0 i)) (minus d (S (trans +hds0 i))) O (le_O_n (minus d (S (trans hds0 i)))))) d (le_plus_minus (S +(trans hds0 i)) d (bge_le (S (trans hds0 i)) d (le_bge (S (trans hds0 i)) d +(lt_le_S (trans hds0 i) d (blt_lt d (trans hds0 i) H0))))))) (\lambda (H0: +(eq bool (blt (trans hds0 i) d) false)).(eq_ind_r T (lift (plus h (S (trans +hds0 i))) O (lift1 (ptrans hds0 i) t)) (\lambda (t0: T).(eq T t0 (lift (S +(plus (trans hds0 i) h)) O (lift1 (ptrans hds0 i) t)))) (eq_ind nat (S (plus +h (trans hds0 i))) (\lambda (n: nat).(eq T (lift n O (lift1 (ptrans hds0 i) +t)) (lift (S (plus (trans hds0 i) h)) O (lift1 (ptrans hds0 i) t)))) (eq_ind_r nat (plus (trans hds0 i) h) (\lambda (n: nat).(eq T (lift (S n) O -(ctrans hds0 i t)) (lift (S (plus (trans hds0 i) h)) O (ctrans hds0 i t)))) -(refl_equal T (lift (S (plus (trans hds0 i) h)) O (ctrans hds0 i t))) (plus h -(trans hds0 i)) (plus_comm h (trans hds0 i))) (plus h (S (trans hds0 i))) -(plus_n_Sm h (trans hds0 i))) (lift h d (lift (S (trans hds0 i)) O (ctrans -hds0 i t))) (lift_free (ctrans hds0 i t) (S (trans hds0 i)) h O d (eq_ind nat -(S (plus O (trans hds0 i))) (\lambda (n: nat).(le d n)) (eq_ind_r nat (plus -(trans hds0 i) O) (\lambda (n: nat).(le d (S n))) (le_S d (plus (trans hds0 -i) O) (le_plus_trans d (trans hds0 i) O (bge_le d (trans hds0 i) H0))) (plus -O (trans hds0 i)) (plus_comm O (trans hds0 i))) (plus O (S (trans hds0 i))) -(plus_n_Sm O (trans hds0 i))) (le_O_n d)))) x_x))) (lift1 hds0 (lift (S i) O -t)) (H i t)))))))) hds). +(lift1 (ptrans hds0 i) t)) (lift (S (plus (trans hds0 i) h)) O (lift1 (ptrans +hds0 i) t)))) (refl_equal T (lift (S (plus (trans hds0 i) h)) O (lift1 +(ptrans hds0 i) t))) (plus h (trans hds0 i)) (plus_comm h (trans hds0 i))) +(plus h (S (trans hds0 i))) (plus_n_Sm h (trans hds0 i))) (lift h d (lift (S +(trans hds0 i)) O (lift1 (ptrans hds0 i) t))) (lift_free (lift1 (ptrans hds0 +i) t) (S (trans hds0 i)) h O d (eq_ind nat (S (plus O (trans hds0 i))) +(\lambda (n: nat).(le d n)) (eq_ind_r nat (plus (trans hds0 i) O) (\lambda +(n: nat).(le d (S n))) (le_S d (plus (trans hds0 i) O) (le_plus_trans d +(trans hds0 i) O (bge_le d (trans hds0 i) H0))) (plus O (trans hds0 i)) +(plus_comm O (trans hds0 i))) (plus O (S (trans hds0 i))) (plus_n_Sm O (trans +hds0 i))) (le_O_n d)))) x_x))) (lift1 hds0 (lift (S i) O t)) (H i t)))))))) +hds). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/makefile b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/makefile index ffdb70ded..db1724d0c 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/makefile +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/makefile @@ -9,25 +9,31 @@ CLEANO=$(RT_BASEDIR)matitaclean.opt $(OPTIONS) devel:=$(shell basename `pwd`) +ifneq "$(SRC)" "" + XXX="SRC=$(SRC)" +endif + all: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) build $(devel) + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) build $(devel) clean: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) clean $(devel) + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) clean $(devel) cleanall: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEAN) all + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEAN) all -all.opt opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) build $(devel) -clean.opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) clean $(devel) -cleanall.opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEANO) all +all.opt opt: preall.opt + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) build $(devel) +clean.opt: preall.opt + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) clean $(devel) +cleanall.opt: preall.opt + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEANO) all %.mo: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) $@ -%.mo.opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) $@ + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) $@ +%.mo.opt: preall.opt + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) $@ preall: - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) init $(devel) + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) init $(devel) +preall.opt: + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) init $(devel) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pc3/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pc3/defs.ma index 6a652e41b..b7651e41f 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pc3/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pc3/defs.ma @@ -24,7 +24,7 @@ definition pc3: \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(ex2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t))))). -inductive pc3_left (c:C): T \to (T \to Prop) \def +inductive pc3_left (c: C): T \to (T \to Prop) \def | pc3_left_r: \forall (t: T).(pc3_left c t t) | pc3_left_ur: \forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall (t3: T).((pc3_left c t2 t3) \to (pc3_left c t1 t3))))) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr0/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr0/fwd.ma index 6f10158a3..d24ae097e 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr0/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr0/fwd.ma @@ -18,267 +18,22 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/pr0/fwd". include "pr0/props.ma". -theorem pr0_gen_sort: +axiom pr0_gen_sort: \forall (x: T).(\forall (n: nat).((pr0 (TSort n) x) \to (eq T x (TSort n)))) -\def - \lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr0 (TSort n) x)).(let H0 -\def (match H in pr0 return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: -(pr0 t t0)).((eq T t (TSort n)) \to ((eq T t0 x) \to (eq T x (TSort n))))))) -with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (TSort n))).(\lambda -(H1: (eq T t x)).(eq_ind T (TSort n) (\lambda (t0: T).((eq T t0 x) \to (eq T -x (TSort n)))) (\lambda (H2: (eq T (TSort n) x)).(eq_ind T (TSort n) (\lambda -(t0: T).(eq T t0 (TSort n))) (refl_equal T (TSort n)) x H2)) t (sym_eq T t -(TSort n) H0) H1))) | (pr0_comp u1 u2 H0 t1 t2 H1 k) \Rightarrow (\lambda -(H2: (eq T (THead k u1 t1) (TSort n))).(\lambda (H3: (eq T (THead k u2 t2) -x)).((let H4 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e in T -return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H2) in -(False_ind ((eq T (THead k u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to -(eq T x (TSort n))))) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t1 t2 H1) -\Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u -t1)) (TSort n))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 -\def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t1)) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TSort n) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 -v2) \to ((pr0 t1 t2) \to (eq T x (TSort n))))) H4)) H3 H0 H1))) | -(pr0_upsilon b H0 v1 v2 H1 u1 u2 H2 t1 t2 H3) \Rightarrow (\lambda (H4: (eq T -(THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (TSort n))).(\lambda (H5: (eq T -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 -\def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TSort n) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 -u1 u2) \to ((pr0 t1 t2) \to (eq T x (TSort n))))))) H6)) H5 H0 H1 H2 H3))) | -(pr0_delta u1 u2 H0 t1 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead -(Bind Abbr) u1 t1) (TSort n))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) -x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (e: T).(match -e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) -H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u1 u2) \to -((pr0 t1 t2) \to ((subst0 O u2 t2 w) \to (eq T x (TSort n)))))) H5)) H4 H0 H1 -H2))) | (pr0_zeta b H0 t1 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead -(Bind b) u (lift (S O) O t1)) (TSort n))).(\lambda (H3: (eq T t2 x)).((let H4 -\def (eq_ind T (THead (Bind b) u (lift (S O) O t1)) (\lambda (e: T).(match e -in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef -_) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H2) in -(False_ind ((eq T t2 x) \to ((not (eq B b Abst)) \to ((pr0 t1 t2) \to (eq T x -(TSort n))))) H4)) H3 H0 H1))) | (pr0_epsilon t1 t2 H0 u) \Rightarrow -(\lambda (H1: (eq T (THead (Flat Cast) u t1) (TSort n))).(\lambda (H2: (eq T -t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t1) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TSort n) H1) in (False_ind ((eq T t2 x) \to ((pr0 t1 t2) \to (eq T x (TSort -n)))) H3)) H2 H0)))]) in (H0 (refl_equal T (TSort n)) (refl_equal T x))))). +. -theorem pr0_gen_lref: +axiom pr0_gen_lref: \forall (x: T).(\forall (n: nat).((pr0 (TLRef n) x) \to (eq T x (TLRef n)))) -\def - \lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr0 (TLRef n) x)).(let H0 -\def (match H in pr0 return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: -(pr0 t t0)).((eq T t (TLRef n)) \to ((eq T t0 x) \to (eq T x (TLRef n))))))) -with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (TLRef n))).(\lambda -(H1: (eq T t x)).(eq_ind T (TLRef n) (\lambda (t0: T).((eq T t0 x) \to (eq T -x (TLRef n)))) (\lambda (H2: (eq T (TLRef n) x)).(eq_ind T (TLRef n) (\lambda -(t0: T).(eq T t0 (TLRef n))) (refl_equal T (TLRef n)) x H2)) t (sym_eq T t -(TLRef n) H0) H1))) | (pr0_comp u1 u2 H0 t1 t2 H1 k) \Rightarrow (\lambda -(H2: (eq T (THead k u1 t1) (TLRef n))).(\lambda (H3: (eq T (THead k u2 t2) -x)).((let H4 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e in T -return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H2) in -(False_ind ((eq T (THead k u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to -(eq T x (TLRef n))))) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t1 t2 H1) -\Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u -t1)) (TLRef n))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 -\def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t1)) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TLRef n) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 -v2) \to ((pr0 t1 t2) \to (eq T x (TLRef n))))) H4)) H3 H0 H1))) | -(pr0_upsilon b H0 v1 v2 H1 u1 u2 H2 t1 t2 H3) \Rightarrow (\lambda (H4: (eq T -(THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (TLRef n))).(\lambda (H5: (eq T -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 -\def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TLRef n) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 -u1 u2) \to ((pr0 t1 t2) \to (eq T x (TLRef n))))))) H6)) H5 H0 H1 H2 H3))) | -(pr0_delta u1 u2 H0 t1 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead -(Bind Abbr) u1 t1) (TLRef n))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) -x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (e: T).(match -e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) -H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u1 u2) \to -((pr0 t1 t2) \to ((subst0 O u2 t2 w) \to (eq T x (TLRef n)))))) H5)) H4 H0 H1 -H2))) | (pr0_zeta b H0 t1 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead -(Bind b) u (lift (S O) O t1)) (TLRef n))).(\lambda (H3: (eq T t2 x)).((let H4 -\def (eq_ind T (THead (Bind b) u (lift (S O) O t1)) (\lambda (e: T).(match e -in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef -_) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H2) in -(False_ind ((eq T t2 x) \to ((not (eq B b Abst)) \to ((pr0 t1 t2) \to (eq T x -(TLRef n))))) H4)) H3 H0 H1))) | (pr0_epsilon t1 t2 H0 u) \Rightarrow -(\lambda (H1: (eq T (THead (Flat Cast) u t1) (TLRef n))).(\lambda (H2: (eq T -t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t1) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TLRef n) H1) in (False_ind ((eq T t2 x) \to ((pr0 t1 t2) \to (eq T x (TLRef -n)))) H3)) H2 H0)))]) in (H0 (refl_equal T (TLRef n)) (refl_equal T x))))). +. -theorem pr0_gen_abst: +axiom pr0_gen_abst: \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Abst) u1 t1) x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))))) -\def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead -(Bind Abst) u1 t1) x)).(let H0 \def (match H in pr0 return (\lambda (t: -T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Bind Abst) u1 -t1)) \to ((eq T t0 x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T -x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))))))) with [(pr0_refl t) -\Rightarrow (\lambda (H0: (eq T t (THead (Bind Abst) u1 t1))).(\lambda (H1: -(eq T t x)).(eq_ind T (THead (Bind Abst) u1 t1) (\lambda (t0: T).((eq T t0 x) -\to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) -u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr0 t1 t2)))))) (\lambda (H2: (eq T (THead (Bind Abst) -u1 t1) x)).(eq_ind T (THead (Bind Abst) u1 t1) (\lambda (t0: T).(ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abst) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: -T).(pr0 t1 t2))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T -(THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 -t2))) u1 t1 (refl_equal T (THead (Bind Abst) u1 t1)) (pr0_refl u1) (pr0_refl -t1)) x H2)) t (sym_eq T t (THead (Bind Abst) u1 t1) H0) H1))) | (pr0_comp u0 -u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead -(Bind Abst) u1 t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) -\Rightarrow t])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H2) in ((let H5 -\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) -with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) -\Rightarrow t])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H2) in ((let H6 -\def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) -with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) -\Rightarrow k0])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H2) in (eq_ind K -(Bind Abst) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T -(THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda -(u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T -t0 t1) \to ((eq T (THead (Bind Abst) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 -t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind -Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3))))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T -t1 (\lambda (t: T).((eq T (THead (Bind Abst) u2 t2) x) \to ((pr0 u1 u2) \to -((pr0 t t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead -(Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))))))) (\lambda (H9: (eq T (THead (Bind -Abst) u2 t2) x)).(eq_ind T (THead (Bind Abst) u2 t2) (\lambda (t: T).((pr0 u1 -u2) \to ((pr0 t1 t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t -(THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))))) (\lambda (H10: (pr0 u1 -u2)).(\lambda (H11: (pr0 t1 t2)).(ex3_2_intro T T (\lambda (u3: T).(\lambda -(t3: T).(eq T (THead (Bind Abst) u2 t2) (THead (Bind Abst) u3 t3)))) (\lambda -(u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 -t1 t3))) u2 t2 (refl_equal T (THead (Bind Abst) u2 t2)) H10 H11))) x H9)) t0 -(sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k (sym_eq K k (Bind Abst) -H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow -(\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead -(Bind Abst) u1 t1))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let -H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda -(e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k in K -return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) -\Rightarrow True])])) I (THead (Bind Abst) u1 t1) H2) in (False_ind ((eq T -(THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t0 t2) \to (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3))))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 -t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind -b) u0 t0)) (THead (Bind Abst) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead -(Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k in K return (\lambda -(_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind Abst) u1 t1) H4) in (False_ind ((eq T (THead (Bind -b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) -\to ((pr0 v1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda -(u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3))))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) -\Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Bind Abst) -u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def -(eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k in K return (\lambda -(_: K).Prop) with [(Bind b) \Rightarrow (match b in B return (\lambda (_: -B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void -\Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Abst) u1 -t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to -((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (ex3_2 T T (\lambda (u3: T).(\lambda -(t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))))) H5)) H4 -H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) \Rightarrow (\lambda (H2: (eq T -(THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1))).(\lambda -(H3: (eq T t2 x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e in T -return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: -((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) -\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with -[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t3) -\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t3))]) in -lref_map) (\lambda (x0: nat).(plus x0 (S O))) O t0) | (TLRef _) \Rightarrow -((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t -with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match -(blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 -t3) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t3))]) in -lref_map) (\lambda (x0: nat).(plus x0 (S O))) O t0) | (THead _ _ t) -\Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 -t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e in T return -(\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | -(THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead -(Bind Abst) u1 t1) H2) in ((let H6 \def (f_equal T B (\lambda (e: T).(match e -in T return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) -\Rightarrow b | (THead k _ _) \Rightarrow (match k in K return (\lambda (_: -K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead -(Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1) H2) in (eq_ind B Abst -(\lambda (b0: B).((eq T u u1) \to ((eq T (lift (S O) O t0) t1) \to ((eq T t2 -x) \to ((not (eq B b0 Abst)) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T -(lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B Abst Abst)) \to ((pr0 -t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind -Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3))))))))) (\lambda (H8: (eq T (lift (S O) O t0) -t1)).(eq_ind T (lift (S O) O t0) (\lambda (t: T).((eq T t2 x) \to ((not (eq B -Abst Abst)) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 -u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))))))) (\lambda (H9: (eq -T t2 x)).(eq_ind T x (\lambda (t: T).((not (eq B Abst Abst)) \to ((pr0 t0 t) -\to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 (lift (S O) O t0) t3))))))) (\lambda (H10: (not (eq -B Abst Abst))).(\lambda (_: (pr0 t0 x)).(False_ind (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (lift -(S O) O t0) t3)))) (H10 (refl_equal B Abst))))) t2 (sym_eq T t2 x H9))) t1 -H8)) u (sym_eq T u u1 H7))) b (sym_eq B b Abst H6))) H5)) H4)) H3 H0 H1))) | -(pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u -t0) (THead (Bind Abst) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def -(eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k in K return (\lambda -(_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind Abst) u1 t1) H1) in (False_ind ((eq T t2 x) \to -((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead -(Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))))) H3)) H2 H0)))]) in (H0 (refl_equal T -(THead (Bind Abst) u1 t1)) (refl_equal T x)))))). +. -theorem pr0_gen_appl: +axiom pr0_gen_appl: \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Flat Appl) u1 t1) x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda @@ -299,1344 +54,33 @@ u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))))) -\def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead -(Flat Appl) u1 t1) x)).(let H0 \def (match H in pr0 return (\lambda (t: -T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Flat Appl) u1 -t1)) \to ((eq T t0 x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 -u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x -(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 -v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))))))) with [(pr0_refl -t) \Rightarrow (\lambda (H0: (eq T t (THead (Flat Appl) u1 t1))).(\lambda -(H1: (eq T t x)).(eq_ind T (THead (Flat Appl) u1 t1) (\lambda (t0: T).((eq T -t0 x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead -(Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Bind b) -v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t2: T).(pr0 z1 t2))))))))))) (\lambda (H2: (eq T (THead (Flat Appl) u1 t1) -x)).(eq_ind T (THead (Flat Appl) u1 t1) (\lambda (t0: T).(or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Appl) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: -T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind -Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T t0 (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t2: T).(pr0 z1 t2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Flat Appl) u2 t2)))) (\lambda -(u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 -t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) -u1 t1) (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T (THead (Flat -Appl) u1 t1) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) -t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda -(y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 -y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))) (ex3_2_intro T T -(\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead -(Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T (THead (Flat Appl) -u1 t1)) (pr0_refl u1) (pr0_refl t1))) x H2)) t (sym_eq T t (THead (Flat Appl) -u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: -(eq T (THead k u0 t0) (THead (Flat Appl) u1 t1))).(\lambda (H3: (eq T (THead -k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e in T return -(\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 -| (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Flat Appl) u1 t1) -H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e in T return -(\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 -| (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Flat Appl) u1 t1) -H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e in T return -(\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | -(THead k0 _ _) \Rightarrow k0])) (THead k u0 t0) (THead (Flat Appl) u1 t1) -H2) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) -\to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: -T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) -v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 -u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 -(\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Flat Appl) u2 t2) x) \to -((pr0 t u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda -(t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T -T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x -(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: -T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 -v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))))) (\lambda (H8: -(eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Flat Appl) u2 t2) -x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (or3 (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind -Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))))))) (\lambda (H9: (eq T (THead (Flat Appl) u2 t2) -x)).(eq_ind T (THead (Flat Appl) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to -((pr0 t1 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t -(THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(t3: T).(eq T t (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t (THead (Bind b) -v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 -u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3)))))))))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: -(pr0 t1 t2)).(or3_intro0 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T -(THead (Flat Appl) u2 t2) (THead (Flat Appl) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Appl) -u2 t2) (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T (THead (Flat -Appl) u2 t2) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) -t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda -(y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 -y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (ex3_2_intro T T -(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Appl) u2 t2) (THead -(Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Flat Appl) -u2 t2)) H10 H11)))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) -k (sym_eq K k (Flat Appl) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 -t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind -Abst) u t0)) (THead (Flat Appl) u1 t1))).(\lambda (H3: (eq T (THead (Bind -Abbr) v2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e in T -return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead (Bind Abst) u -t0) | (TLRef _) \Rightarrow (THead (Bind Abst) u t0) | (THead _ _ t) -\Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat -Appl) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e in T -return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) -\Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead -(Bind Abst) u t0)) (THead (Flat Appl) u1 t1) H2) in (eq_ind T u1 (\lambda (t: -T).((eq T (THead (Bind Abst) u t0) t1) \to ((eq T (THead (Bind Abbr) v2 t2) -x) \to ((pr0 t v2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b) v3 (THead -(Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3)))))))))))))) (\lambda (H6: (eq T (THead (Bind Abst) u t0) -t1)).(eq_ind T (THead (Bind Abst) u t0) (\lambda (t: T).((eq T (THead (Bind -Abbr) v2 t2) x) \to ((pr0 u1 v2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b) v3 (THead -(Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))))))) (\lambda (H7: (eq T (THead (Bind Abbr) v2 t2) -x)).(eq_ind T (THead (Bind Abbr) v2 t2) (\lambda (t: T).((pr0 u1 v2) \to -((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t -(THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr0 (THead (Bind Abst) u t0) t3)))) (ex4_4 -T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq -T (THead (Bind Abst) u t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -Abst) u t0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t -(THead (Bind b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 -v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))) (\lambda (H8: (pr0 -u1 v2)).(\lambda (H9: (pr0 t0 t2)).(or3_intro1 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Flat Appl) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 (THead (Bind Abst) u t0) t3)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind Abst) u t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) -v2 t2) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind Abst) u t0) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda -(t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind b) v3 (THead (Flat Appl) -(lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind Abbr) u2 t3)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3))))) u t0 v2 t2 (refl_equal T (THead (Bind Abst) u t0)) (refl_equal T -(THead (Bind Abbr) v2 t2)) H8 H9)))) x H7)) t1 H6)) v1 (sym_eq T v1 u1 H5))) -H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow -(\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead -(Flat Appl) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead -(Bind b) u0 t0) | (TLRef _) \Rightarrow (THead (Bind b) u0 t0) | (THead _ _ -t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead -(Flat Appl) u1 t1) H4) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e -in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) -\Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead -(Bind b) u0 t0)) (THead (Flat Appl) u1 t1) H4) in (eq_ind T u1 (\lambda (t: -T).((eq T (THead (Bind b) u0 t0) t1) \to ((eq T (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 t -v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind -Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b0) v3 (THead -(Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3)))))))))))))))) (\lambda (H8: (eq T (THead (Bind b) u0 t0) -t1)).(eq_ind T (THead (Bind b) u0 t0) (\lambda (t: T).((eq T (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to -((pr0 u1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda -(u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t -t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind -Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind -b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b0) v3 (THead -(Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))))))))) (\lambda (H9: (eq T (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t2)) x)).(eq_ind T (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t2)) (\lambda (t: T).((not (eq B b -Abst)) \to ((pr0 u1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: -T).(pr0 (THead (Bind b) u0 t0) t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 -t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u3 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) -(ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda -(b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind b0) y1 -z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (v3: T).(\lambda (t3: T).(eq T t (THead (Bind b0) v3 (THead (Flat -Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3)))))))))))))) (\lambda (H10: (not (eq B b Abst))).(\lambda (H11: (pr0 u1 -v2)).(\lambda (H12: (pr0 u0 u2)).(\lambda (H13: (pr0 t0 t2)).(or3_intro2 -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t2)) (THead (Flat Appl) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 (THead -(Bind b) u0 t0) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) -(THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) -u0 t0) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) -v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 -u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3)))))))) (ex6_6_intro B T T T T T (\lambda (b0: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not -(eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 -t0) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind -b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) v3 (THead -(Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))) b u0 t0 v2 u2 t2 H10 (refl_equal T (THead (Bind b) -u0 t0)) (refl_equal T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t2))) H11 H12 H13)))))) x H9)) t1 H8)) v1 (sym_eq T v1 u1 H7))) H6)) H5 H0 H1 -H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T -(THead (Bind Abbr) u0 t0) (THead (Flat Appl) u1 t1))).(\lambda (H4: (eq T -(THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u0 -t0) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort -_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u1 -t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to -((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or3 (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind -Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 -u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) -(THead (Flat Appl) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (eq_ind -T (THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k in K return (\lambda -(_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow -False])])) I (THead (Flat Appl) u1 t1) H2) in (False_ind ((eq T t2 x) \to -((not (eq B b Abst)) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b0) v2 (THead -(Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3)))))))))))) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) -\Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Flat Appl) -u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat -Cast) u t0) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) -\Rightarrow False | (Flat f) \Rightarrow (match f in F return (\lambda (_: -F).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead -(Flat Appl) u1 t1) H1) in (False_ind ((eq T t2 x) \to ((pr0 t0 t2) \to (or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) -v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))))) H3)) H2 H0)))]) in (H0 (refl_equal T (THead -(Flat Appl) u1 t1)) (refl_equal T x)))))). +. -theorem pr0_gen_cast: +axiom pr0_gen_cast: \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Flat Cast) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x))))) -\def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead -(Flat Cast) u1 t1) x)).(let H0 \def (match H in pr0 return (\lambda (t: -T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Flat Cast) u1 -t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 -u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x))))))) -with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Flat Cast) u1 -t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Flat Cast) u1 t1) (\lambda -(t0: T).((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq -T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 -u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x)))) (\lambda -(H2: (eq T (THead (Flat Cast) u1 t1) x)).(eq_ind T (THead (Flat Cast) u1 t1) -(\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 -(THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 t0))) (or_introl -(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Cast) u1 t1) -(THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (THead (Flat Cast) u1 -t1)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat -Cast) u1 t1) (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 -(refl_equal T (THead (Flat Cast) u1 t1)) (pr0_refl u1) (pr0_refl t1))) x H2)) -t (sym_eq T t (THead (Flat Cast) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 -H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Flat Cast) u1 -t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T -(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) -(THead k u0 t0) (THead (Flat Cast) u1 t1) H2) in ((let H5 \def (f_equal T T -(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) -(THead k u0 t0) (THead (Flat Cast) u1 t1) H2) in ((let H6 \def (f_equal T K -(\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) -\Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) -(THead k u0 t0) (THead (Flat Cast) u1 t1) H2) in (eq_ind K (Flat Cast) -(\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) -x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 x)))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda -(t: T).((eq T t0 t1) \to ((eq T (THead (Flat Cast) u2 t2) x) \to ((pr0 t u2) -\to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x -(THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))))) (\lambda -(H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Flat Cast) u2 -t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 x)))))) (\lambda (H9: (eq T (THead (Flat Cast) u2 t2) -x)).(eq_ind T (THead (Flat Cast) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to -((pr0 t1 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t -(THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t))))) (\lambda (H10: -(pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(or_introl (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T (THead (Flat Cast) u2 t2) (THead (Flat Cast) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (THead (Flat Cast) u2 t2)) -(ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Cast) -u2 t2) (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 -u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T -(THead (Flat Cast) u2 t2)) H10 H11)))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 -(sym_eq T u0 u1 H7))) k (sym_eq K k (Flat Cast) H6))) H5)) H4)) H3 H0 H1))) | -(pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat -Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Cast) u1 t1))).(\lambda (H3: -(eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat -Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k in K return (\lambda -(_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f -in F return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast -\Rightarrow False])])])) I (THead (Flat Cast) u1 t1) H2) in (False_ind ((eq T -(THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t0 t2) \to (or (ex3_2 -T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3)))) (pr0 t1 x))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 -H1 u0 u2 H2 t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 -(THead (Bind b) u0 t0)) (THead (Flat Cast) u1 t1))).(\lambda (H5: (eq T -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 -\def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k in K -return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) -\Rightarrow (match f in F return (\lambda (_: F).Prop) with [Appl \Rightarrow -True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u1 t1) H4) in -(False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u2) \to ((pr0 -t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead -(Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))))) H6)) H5 H0 H1 H2 -H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T -(THead (Bind Abbr) u0 t0) (THead (Flat Cast) u1 t1))).(\lambda (H4: (eq T -(THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u0 -t0) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort -_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u1 -t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to -((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 x)))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) -\Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead -(Flat Cast) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (eq_ind T -(THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k in K return (\lambda -(_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow -False])])) I (THead (Flat Cast) u1 t1) H2) in (False_ind ((eq T t2 x) \to -((not (eq B b Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 x))))) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow -(\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Flat Cast) u1 -t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | -(TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) -u t0) (THead (Flat Cast) u1 t1) H1) in ((let H4 \def (f_equal T T (\lambda -(e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow u -| (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) -u t0) (THead (Flat Cast) u1 t1) H1) in (eq_ind T u1 (\lambda (_: T).((eq T t0 -t1) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 x)))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: -T).((eq T t2 x) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 -x))))) (\lambda (H6: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 t1 t) \to -(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x)))) (\lambda (H7: (pr0 t1 -x)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead -(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x) H7)) t2 (sym_eq T t2 x -H6))) t0 (sym_eq T t0 t1 H5))) u (sym_eq T u u1 H4))) H3)) H2 H0)))]) in (H0 -(refl_equal T (THead (Flat Cast) u1 t1)) (refl_equal T x)))))). +. -theorem pr0_gen_abbr: +axiom pr0_gen_abbr: \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Abbr) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O x)))))) -\def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead -(Bind Abbr) u1 t1) x)).(let H0 \def (match H in pr0 return (\lambda (t: -T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Bind Abbr) u1 -t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 -u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda -(y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S -O) O x)))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead -(Bind Abbr) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Bind Abbr) -u1 t1) (\lambda (t0: T).((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 -t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y -t2))))))) (pr0 t1 (lift (S O) O x))))) (\lambda (H2: (eq T (THead (Bind Abbr) -u1 t1) x)).(eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (t0: T).(or (ex3_2 T -T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: -T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 -O u2 y t2))))))) (pr0 t1 (lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda -(u2: T).(\lambda (t2: T).(eq T (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) -u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: -T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) -(\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O (THead (Bind -Abbr) u1 t1))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T -(THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 -t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y -t2)))))) u1 t1 (refl_equal T (THead (Bind Abbr) u1 t1)) (pr0_refl u1) -(or_introl (pr0 t1 t1) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: -T).(subst0 O u1 y t1))) (pr0_refl t1)))) x H2)) t (sym_eq T t (THead (Bind -Abbr) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda -(H2: (eq T (THead k u0 t0) (THead (Bind Abbr) u1 t1))).(\lambda (H3: (eq T -(THead k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e in T -return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) -\Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Bind -Abbr) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e in T -return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) -\Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Bind -Abbr) u1 t1) H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e in T -return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) -\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u0 t0) (THead (Bind -Abbr) u1 t1) H2) in (eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u0 u1) \to -((eq T t0 t1) \to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 -t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind -Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) -(\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x))))))))) -(\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to -((eq T (THead (Bind Abbr) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to (or -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) -(\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x)))))))) -(\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Bind -Abbr) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda -(u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 -t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y -t3))))))) (pr0 t1 (lift (S O) O x))))))) (\lambda (H9: (eq T (THead (Bind -Abbr) u2 t2) x)).(eq_ind T (THead (Bind Abbr) u2 t2) (\lambda (t: T).((pr0 u1 -u2) \to ((pr0 t1 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq -T t (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 -u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: -T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O -t)))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(or_introl -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 t2) -(THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) -(\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 -t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O (THead -(Bind Abbr) u2 t2))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T -(THead (Bind Abbr) u2 t2) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 -t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y -t3)))))) u2 t2 (refl_equal T (THead (Bind Abbr) u2 t2)) H10 (or_introl (pr0 -t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y -t2))) H11))))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k -(sym_eq K k (Bind Abbr) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 -t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind -Abst) u t0)) (THead (Bind Abbr) u1 t1))).(\lambda (H3: (eq T (THead (Bind -Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind -Abst) u t0)) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 -t1) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) -\to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x -(THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) -(\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 -t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x)))))) -H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow -(\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead -(Bind Abbr) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) -v1 (THead (Bind b) u0 t0)) (\lambda (e: T).(match e in T return (\lambda (_: -T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | -(THead k _ _) \Rightarrow (match k in K return (\lambda (_: K).Prop) with -[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind -Abbr) u1 t1) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 -u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: -T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 -u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda -(y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S -O) O x)))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) -\Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) -u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) -\Rightarrow t])) (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) u1 t1) H3) in -((let H6 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: -T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t -_) \Rightarrow t])) (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) u1 t1) H3) -in (eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Bind Abbr) -u2 w) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) -(\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x))))))))) -(\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Bind -Abbr) u2 w) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to ((subst0 O u2 t2 w) \to -(or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) -u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) -(\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x)))))))) -(\lambda (H8: (eq T (THead (Bind Abbr) u2 w) x)).(eq_ind T (THead (Bind Abbr) -u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to ((subst0 O u2 t2 w) -\to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind -Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) -(\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O t))))))) -(\lambda (H9: (pr0 u1 u2)).(\lambda (H10: (pr0 t1 t2)).(\lambda (H11: (subst0 -O u2 t2 w)).(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T -(THead (Bind Abbr) u2 w) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 -t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y -t3))))))) (pr0 t1 (lift (S O) O (THead (Bind Abbr) u2 w))) (ex3_2_intro T T -(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) (THead (Bind -Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) -(\lambda (y: T).(subst0 O u3 y t3)))))) u2 w (refl_equal T (THead (Bind Abbr) -u2 w)) H9 (or_intror (pr0 t1 w) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda -(y: T).(subst0 O u2 y w))) (ex_intro2 T (\lambda (y: T).(pr0 t1 y)) (\lambda -(y: T).(subst0 O u2 y w)) t2 H10 H11))))))) x H8)) t0 (sym_eq T t0 t1 H7))) -u0 (sym_eq T u0 u1 H6))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) -\Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead -(Bind Abbr) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (f_equal T T -(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T -\def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow -(TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) -| (THead k u0 t3) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) -t3))]) in lref_map) (\lambda (x0: nat).(plus x0 (S O))) O t0) | (TLRef _) -\Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T -\def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow -(TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) -| (THead k u0 t3) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) -t3))]) in lref_map) (\lambda (x0: nat).(plus x0 (S O))) O t0) | (THead _ _ t) -\Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 -t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e in T return -(\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | -(THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead -(Bind Abbr) u1 t1) H2) in ((let H6 \def (f_equal T B (\lambda (e: T).(match e -in T return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) -\Rightarrow b | (THead k _ _) \Rightarrow (match k in K return (\lambda (_: -K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead -(Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1) H2) in (eq_ind B Abbr -(\lambda (b0: B).((eq T u u1) \to ((eq T (lift (S O) O t0) t1) \to ((eq T t2 -x) \to ((not (eq B b0 Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 -t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y -t3))))))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T u u1)).(eq_ind -T u1 (\lambda (_: T).((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not -(eq B Abbr Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 -t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y -t3))))))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T (lift (S O) O -t0) t1)).(eq_ind T (lift (S O) O t0) (\lambda (t: T).((eq T t2 x) \to ((not -(eq B Abbr Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t -t3) (ex2 T (\lambda (y: T).(pr0 t y)) (\lambda (y: T).(subst0 O u2 y -t3))))))) (pr0 t (lift (S O) O x))))))) (\lambda (H9: (eq T t2 x)).(eq_ind T -x (\lambda (t: T).((not (eq B Abbr Abst)) \to ((pr0 t0 t) \to (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: -T).(or (pr0 (lift (S O) O t0) t3) (ex2 T (\lambda (y: T).(pr0 (lift (S O) O -t0) y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 (lift (S O) O t0) (lift -(S O) O x)))))) (\lambda (_: (not (eq B Abbr Abst))).(\lambda (H11: (pr0 t0 -x)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead -(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(u2: T).(\lambda (t3: T).(or (pr0 (lift (S O) O t0) t3) (ex2 T (\lambda (y: -T).(pr0 (lift (S O) O t0) y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 -(lift (S O) O t0) (lift (S O) O x)) (pr0_lift t0 x H11 (S O) O)))) t2 (sym_eq -T t2 x H9))) t1 H8)) u (sym_eq T u u1 H7))) b (sym_eq B b Abbr H6))) H5)) -H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T -(THead (Flat Cast) u t0) (THead (Bind Abbr) u1 t1))).(\lambda (H2: (eq T t2 -x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e -in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef -_) \Rightarrow False | (THead k _ _) \Rightarrow (match k in K return -(\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind Abbr) u1 t1) H1) in (False_ind ((eq T t2 x) \to -((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x -(THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) -(\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 -t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x))))) -H3)) H2 H0)))]) in (H0 (refl_equal T (THead (Bind Abbr) u1 t1)) (refl_equal T -x)))))). +. -theorem pr0_gen_void: +axiom pr0_gen_void: \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Void) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O x)))))) -\def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead -(Bind Void) u1 t1) x)).(let H0 \def (match H in pr0 return (\lambda (t: -T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Bind Void) u1 -t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 -u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) -O x)))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Bind -Void) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Bind Void) u1 t1) -(\lambda (t0: T).((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 -(lift (S O) O x))))) (\lambda (H2: (eq T (THead (Bind Void) u1 t1) -x)).(eq_ind T (THead (Bind Void) u1 t1) (\lambda (t0: T).(or (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Void) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: -T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda -(u2: T).(\lambda (t2: T).(eq T (THead (Bind Void) u1 t1) (THead (Bind Void) -u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O (THead (Bind Void) -u1 t1))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead -(Bind Void) u1 t1) (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 -(refl_equal T (THead (Bind Void) u1 t1)) (pr0_refl u1) (pr0_refl t1))) x H2)) -t (sym_eq T t (THead (Bind Void) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 -H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Bind Void) u1 -t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T -(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) -(THead k u0 t0) (THead (Bind Void) u1 t1) H2) in ((let H5 \def (f_equal T T -(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) -(THead k u0 t0) (THead (Bind Void) u1 t1) H2) in ((let H6 \def (f_equal T K -(\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) -\Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) -(THead k u0 t0) (THead (Bind Void) u1 t1) H2) in (eq_ind K (Bind Void) -(\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) -x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T -u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Bind Void) u2 t2) x) \to -((pr0 t u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda -(t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 -(lift (S O) O x)))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: -T).((eq T (THead (Bind Void) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to -(or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) -u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))))) (\lambda -(H9: (eq T (THead (Bind Void) u2 t2) x)).(eq_ind T (THead (Bind Void) u2 t2) -(\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to (or (ex3_2 T T (\lambda -(u3: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (lift (S O) O t)))))) (\lambda (H10: (pr0 u1 u2)).(\lambda -(H11: (pr0 t1 t2)).(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: -T).(eq T (THead (Bind Void) u2 t2) (THead (Bind Void) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (lift (S O) O (THead (Bind Void) u2 t2))) (ex3_2_intro T T -(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Void) u2 t2) (THead -(Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Bind Void) -u2 t2)) H10 H11)))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) -k (sym_eq K k (Bind Void) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 -t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind -Abst) u t0)) (THead (Bind Void) u1 t1))).(\lambda (H3: (eq T (THead (Bind -Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind -Abst) u t0)) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Void) u1 -t1) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) -\to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x -(THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x)))))) -H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow -(\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead -(Bind Void) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) -v1 (THead (Bind b) u0 t0)) (\lambda (e: T).(match e in T return (\lambda (_: -T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | -(THead k _ _) \Rightarrow (match k in K return (\lambda (_: K).Prop) with -[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind -Void) u1 t1) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 -u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: -T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 -u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) -O x)))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) -\Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Bind Void) -u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def -(eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k in K return (\lambda -(_: K).Prop) with [(Bind b) \Rightarrow (match b in B return (\lambda (_: -B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void -\Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Void) u1 -t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to -((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (lift (S O) O x))))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 -t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) -(THead (Bind Void) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (f_equal -T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T -\def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow -(TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) -| (THead k u0 t3) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) -t3))]) in lref_map) (\lambda (x0: nat).(plus x0 (S O))) O t0) | (TLRef _) -\Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T -\def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow -(TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) -| (THead k u0 t3) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) -t3))]) in lref_map) (\lambda (x0: nat).(plus x0 (S O))) O t0) | (THead _ _ t) -\Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 -t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e in T return -(\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | -(THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead -(Bind Void) u1 t1) H2) in ((let H6 \def (f_equal T B (\lambda (e: T).(match e -in T return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) -\Rightarrow b | (THead k _ _) \Rightarrow (match k in K return (\lambda (_: -K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead -(Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 t1) H2) in (eq_ind B Void -(\lambda (b0: B).((eq T u u1) \to ((eq T (lift (S O) O t0) t1) \to ((eq T t2 -x) \to ((not (eq B b0 Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T -u1 (\lambda (_: T).((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not -(eq B Void Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T (lift (S O) O t0) -t1)).(eq_ind T (lift (S O) O t0) (\lambda (t: T).((eq T t2 x) \to ((not (eq B -Void Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))) (pr0 t (lift -(S O) O x))))))) (\lambda (H9: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((not -(eq B Void Abst)) \to ((pr0 t0 t) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (lift -(S O) O t0) t3)))) (pr0 (lift (S O) O t0) (lift (S O) O x)))))) (\lambda (_: -(not (eq B Void Abst))).(\lambda (H11: (pr0 t0 x)).(or_intror (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 (lift (S O) O t0) t3)))) (pr0 (lift (S O) O t0) (lift (S O) O x)) -(pr0_lift t0 x H11 (S O) O)))) t2 (sym_eq T t2 x H9))) t1 H8)) u (sym_eq T u -u1 H7))) b (sym_eq B b Void H6))) H5)) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 -H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Bind -Void) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead -(Flat Cast) u t0) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ -_) \Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Void) u1 -t1) H1) in (False_ind ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))) H3)) H2 H0)))]) in (H0 -(refl_equal T (THead (Bind Void) u1 t1)) (refl_equal T x)))))). +. -theorem pr0_gen_lift: +axiom pr0_gen_lift: \forall (t1: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((pr0 (lift h d t1) x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr0 t1 t2))))))) -\def - \lambda (t1: T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda -(H: (pr0 (lift h d t1) x)).(insert_eq T (lift h d t1) (\lambda (t: T).(pr0 t -x)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr0 t1 -t2))) (\lambda (y: T).(\lambda (H0: (pr0 y x)).(unintro nat d (\lambda (n: -nat).((eq T y (lift h n t1)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h n -t2))) (\lambda (t2: T).(pr0 t1 t2))))) (unintro T t1 (\lambda (t: T).(\forall -(x0: nat).((eq T y (lift h x0 t)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h -x0 t2))) (\lambda (t2: T).(pr0 t t2)))))) (pr0_ind (\lambda (t: T).(\lambda -(t0: T).(\forall (x0: T).(\forall (x1: nat).((eq T t (lift h x1 x0)) \to (ex2 -T (\lambda (t2: T).(eq T t0 (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 -t2)))))))) (\lambda (t: T).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H1: -(eq T t (lift h x1 x0))).(ex_intro2 T (\lambda (t2: T).(eq T t (lift h x1 -t2))) (\lambda (t2: T).(pr0 x0 t2)) x0 H1 (pr0_refl x0)))))) (\lambda (u1: -T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (H2: ((\forall (x0: -T).(\forall (x1: nat).((eq T u1 (lift h x1 x0)) \to (ex2 T (\lambda (t2: -T).(eq T u2 (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 t2)))))))).(\lambda -(t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 t3)).(\lambda (H4: ((\forall -(x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to (ex2 T (\lambda (t4: -T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4)))))))).(\lambda (k: -K).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: (eq T (THead k u1 t2) -(lift h x1 x0))).(K_ind (\lambda (k0: K).((eq T (THead k0 u1 t2) (lift h x1 -x0)) \to (ex2 T (\lambda (t4: T).(eq T (THead k0 u2 t3) (lift h x1 t4))) -(\lambda (t4: T).(pr0 x0 t4))))) (\lambda (b: B).(\lambda (H6: (eq T (THead -(Bind b) u1 t2) (lift h x1 x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: -T).(eq T x0 (THead (Bind b) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T -u1 (lift h x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (S x1) -z)))) (ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 t3) (lift h x1 t4))) -(\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda -(H7: (eq T x0 (THead (Bind b) x2 x3))).(\lambda (H8: (eq T u1 (lift h x1 -x2))).(\lambda (H9: (eq T t2 (lift h (S x1) x3))).(eq_ind_r T (THead (Bind b) -x2 x3) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 t3) -(lift h x1 t4))) (\lambda (t4: T).(pr0 t t4)))) (ex2_ind T (\lambda (t4: -T).(eq T t3 (lift h (S x1) t4))) (\lambda (t4: T).(pr0 x3 t4)) (ex2 T -(\lambda (t4: T).(eq T (THead (Bind b) u2 t3) (lift h x1 t4))) (\lambda (t4: -T).(pr0 (THead (Bind b) x2 x3) t4))) (\lambda (x4: T).(\lambda (H_x: (eq T t3 -(lift h (S x1) x4))).(\lambda (H10: (pr0 x3 x4)).(eq_ind_r T (lift h (S x1) -x4) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 t) (lift -h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) x2 x3) t4)))) (ex2_ind T -(\lambda (t4: T).(eq T u2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x2 t4)) (ex2 -T (\lambda (t4: T).(eq T (THead (Bind b) u2 (lift h (S x1) x4)) (lift h x1 -t4))) (\lambda (t4: T).(pr0 (THead (Bind b) x2 x3) t4))) (\lambda (x5: -T).(\lambda (H_x0: (eq T u2 (lift h x1 x5))).(\lambda (H11: (pr0 x2 -x5)).(eq_ind_r T (lift h x1 x5) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T -(THead (Bind b) t (lift h (S x1) x4)) (lift h x1 t4))) (\lambda (t4: T).(pr0 -(THead (Bind b) x2 x3) t4)))) (ex_intro2 T (\lambda (t4: T).(eq T (THead -(Bind b) (lift h x1 x5) (lift h (S x1) x4)) (lift h x1 t4))) (\lambda (t4: -T).(pr0 (THead (Bind b) x2 x3) t4)) (THead (Bind b) x5 x4) (sym_eq T (lift h -x1 (THead (Bind b) x5 x4)) (THead (Bind b) (lift h x1 x5) (lift h (S x1) x4)) -(lift_bind b x5 x4 h x1)) (pr0_comp x2 x5 H11 x3 x4 H10 (Bind b))) u2 -H_x0)))) (H2 x2 x1 H8)) t3 H_x)))) (H4 x3 (S x1) H9)) x0 H7)))))) -(lift_gen_bind b u1 t2 x0 h x1 H6)))) (\lambda (f: F).(\lambda (H6: (eq T -(THead (Flat f) u1 t2) (lift h x1 x0))).(ex3_2_ind T T (\lambda (y0: -T).(\lambda (z: T).(eq T x0 (THead (Flat f) y0 z)))) (\lambda (y0: -T).(\lambda (_: T).(eq T u1 (lift h x1 y0)))) (\lambda (_: T).(\lambda (z: -T).(eq T t2 (lift h x1 z)))) (ex2 T (\lambda (t4: T).(eq T (THead (Flat f) u2 -t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: T).(\lambda -(x3: T).(\lambda (H7: (eq T x0 (THead (Flat f) x2 x3))).(\lambda (H8: (eq T -u1 (lift h x1 x2))).(\lambda (H9: (eq T t2 (lift h x1 x3))).(eq_ind_r T -(THead (Flat f) x2 x3) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead -(Flat f) u2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 t t4)))) (ex2_ind T -(\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x3 t4)) (ex2 -T (\lambda (t4: T).(eq T (THead (Flat f) u2 t3) (lift h x1 t4))) (\lambda -(t4: T).(pr0 (THead (Flat f) x2 x3) t4))) (\lambda (x4: T).(\lambda (H_x: (eq -T t3 (lift h x1 x4))).(\lambda (H10: (pr0 x3 x4)).(eq_ind_r T (lift h x1 x4) -(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Flat f) u2 t) (lift h -x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat f) x2 x3) t4)))) (ex2_ind T -(\lambda (t4: T).(eq T u2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x2 t4)) (ex2 -T (\lambda (t4: T).(eq T (THead (Flat f) u2 (lift h x1 x4)) (lift h x1 t4))) -(\lambda (t4: T).(pr0 (THead (Flat f) x2 x3) t4))) (\lambda (x5: T).(\lambda -(H_x0: (eq T u2 (lift h x1 x5))).(\lambda (H11: (pr0 x2 x5)).(eq_ind_r T -(lift h x1 x5) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Flat f) -t (lift h x1 x4)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat f) x2 -x3) t4)))) (ex_intro2 T (\lambda (t4: T).(eq T (THead (Flat f) (lift h x1 x5) -(lift h x1 x4)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat f) x2 x3) -t4)) (THead (Flat f) x5 x4) (sym_eq T (lift h x1 (THead (Flat f) x5 x4)) -(THead (Flat f) (lift h x1 x5) (lift h x1 x4)) (lift_flat f x5 x4 h x1)) -(pr0_comp x2 x5 H11 x3 x4 H10 (Flat f))) u2 H_x0)))) (H2 x2 x1 H8)) t3 -H_x)))) (H4 x3 x1 H9)) x0 H7)))))) (lift_gen_flat f u1 t2 x0 h x1 H6)))) k -H5))))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda -(_: (pr0 v1 v2)).(\lambda (H2: ((\forall (x0: T).(\forall (x1: nat).((eq T v1 -(lift h x1 x0)) \to (ex2 T (\lambda (t2: T).(eq T v2 (lift h x1 t2))) -(\lambda (t2: T).(pr0 x0 t2)))))))).(\lambda (t2: T).(\lambda (t3: -T).(\lambda (_: (pr0 t2 t3)).(\lambda (H4: ((\forall (x0: T).(\forall (x1: -nat).((eq T t2 (lift h x1 x0)) \to (ex2 T (\lambda (t4: T).(eq T t3 (lift h -x1 t4))) (\lambda (t4: T).(pr0 x0 t4)))))))).(\lambda (x0: T).(\lambda (x1: -nat).(\lambda (H5: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t2)) -(lift h x1 x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 -(THead (Flat Appl) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T v1 (lift h -x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T (THead (Bind Abst) u t2) -(lift h x1 z)))) (ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) v2 t3) -(lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: T).(\lambda -(x3: T).(\lambda (H6: (eq T x0 (THead (Flat Appl) x2 x3))).(\lambda (H7: (eq -T v1 (lift h x1 x2))).(\lambda (H8: (eq T (THead (Bind Abst) u t2) (lift h x1 -x3))).(eq_ind_r T (THead (Flat Appl) x2 x3) (\lambda (t: T).(ex2 T (\lambda -(t4: T).(eq T (THead (Bind Abbr) v2 t3) (lift h x1 t4))) (\lambda (t4: -T).(pr0 t t4)))) (ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x3 -(THead (Bind Abst) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u (lift h -x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (S x1) z)))) (ex2 -T (\lambda (t4: T).(eq T (THead (Bind Abbr) v2 t3) (lift h x1 t4))) (\lambda -(t4: T).(pr0 (THead (Flat Appl) x2 x3) t4))) (\lambda (x4: T).(\lambda (x5: -T).(\lambda (H9: (eq T x3 (THead (Bind Abst) x4 x5))).(\lambda (_: (eq T u -(lift h x1 x4))).(\lambda (H11: (eq T t2 (lift h (S x1) x5))).(eq_ind_r T -(THead (Bind Abst) x4 x5) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T -(THead (Bind Abbr) v2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat -Appl) x2 t) t4)))) (ex2_ind T (\lambda (t4: T).(eq T t3 (lift h (S x1) t4))) -(\lambda (t4: T).(pr0 x5 t4)) (ex2 T (\lambda (t4: T).(eq T (THead (Bind -Abbr) v2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 -(THead (Bind Abst) x4 x5)) t4))) (\lambda (x6: T).(\lambda (H_x: (eq T t3 -(lift h (S x1) x6))).(\lambda (H12: (pr0 x5 x6)).(eq_ind_r T (lift h (S x1) -x6) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) v2 t) -(lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind -Abst) x4 x5)) t4)))) (ex2_ind T (\lambda (t4: T).(eq T v2 (lift h x1 t4))) -(\lambda (t4: T).(pr0 x2 t4)) (ex2 T (\lambda (t4: T).(eq T (THead (Bind -Abbr) v2 (lift h (S x1) x6)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead -(Flat Appl) x2 (THead (Bind Abst) x4 x5)) t4))) (\lambda (x7: T).(\lambda -(H_x0: (eq T v2 (lift h x1 x7))).(\lambda (H13: (pr0 x2 x7)).(eq_ind_r T -(lift h x1 x7) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind -Abbr) t (lift h (S x1) x6)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead -(Flat Appl) x2 (THead (Bind Abst) x4 x5)) t4)))) (ex_intro2 T (\lambda (t4: -T).(eq T (THead (Bind Abbr) (lift h x1 x7) (lift h (S x1) x6)) (lift h x1 -t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind Abst) x4 x5)) -t4)) (THead (Bind Abbr) x7 x6) (sym_eq T (lift h x1 (THead (Bind Abbr) x7 -x6)) (THead (Bind Abbr) (lift h x1 x7) (lift h (S x1) x6)) (lift_bind Abbr x7 -x6 h x1)) (pr0_beta x4 x2 x7 H13 x5 x6 H12)) v2 H_x0)))) (H2 x2 x1 H7)) t3 -H_x)))) (H4 x5 (S x1) H11)) x3 H9)))))) (lift_gen_bind Abst u t2 x3 h x1 H8)) -x0 H6)))))) (lift_gen_flat Appl v1 (THead (Bind Abst) u t2) x0 h x1 -H5)))))))))))))) (\lambda (b: B).(\lambda (H1: (not (eq B b Abst))).(\lambda -(v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (H3: ((\forall -(x0: T).(\forall (x1: nat).((eq T v1 (lift h x1 x0)) \to (ex2 T (\lambda (t2: -T).(eq T v2 (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 t2)))))))).(\lambda -(u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (H5: ((\forall -(x0: T).(\forall (x1: nat).((eq T u1 (lift h x1 x0)) \to (ex2 T (\lambda (t2: -T).(eq T u2 (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 t2)))))))).(\lambda -(t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 t3)).(\lambda (H7: ((\forall -(x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to (ex2 T (\lambda (t4: -T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4)))))))).(\lambda -(x0: T).(\lambda (x1: nat).(\lambda (H8: (eq T (THead (Flat Appl) v1 (THead -(Bind b) u1 t2)) (lift h x1 x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda -(z: T).(eq T x0 (THead (Flat Appl) y0 z)))) (\lambda (y0: T).(\lambda (_: -T).(eq T v1 (lift h x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T (THead -(Bind b) u1 t2) (lift h x1 z)))) (ex2 T (\lambda (t4: T).(eq T (THead (Bind -b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) (lift h x1 t4))) (\lambda -(t4: T).(pr0 x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq T -x0 (THead (Flat Appl) x2 x3))).(\lambda (H10: (eq T v1 (lift h x1 -x2))).(\lambda (H11: (eq T (THead (Bind b) u1 t2) (lift h x1 x3))).(eq_ind_r -T (THead (Flat Appl) x2 x3) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) (lift h x1 t4))) -(\lambda (t4: T).(pr0 t t4)))) (ex3_2_ind T T (\lambda (y0: T).(\lambda (z: -T).(eq T x3 (THead (Bind b) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T -u1 (lift h x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (S x1) -z)))) (ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t3)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat -Appl) x2 x3) t4))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H12: (eq T x3 -(THead (Bind b) x4 x5))).(\lambda (H13: (eq T u1 (lift h x1 x4))).(\lambda -(H14: (eq T t2 (lift h (S x1) x5))).(eq_ind_r T (THead (Bind b) x4 x5) -(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t3)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead -(Flat Appl) x2 t) t4)))) (ex2_ind T (\lambda (t4: T).(eq T t3 (lift h (S x1) -t4))) (\lambda (t4: T).(pr0 x5 t4)) (ex2 T (\lambda (t4: T).(eq T (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) (lift h x1 t4))) -(\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind b) x4 x5)) t4))) -(\lambda (x6: T).(\lambda (H_x: (eq T t3 (lift h (S x1) x6))).(\lambda (H15: -(pr0 x5 x6)).(eq_ind_r T (lift h (S x1) x6) (\lambda (t: T).(ex2 T (\lambda -(t4: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t)) -(lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind b) -x4 x5)) t4)))) (ex2_ind T (\lambda (t4: T).(eq T u2 (lift h x1 t4))) (\lambda -(t4: T).(pr0 x4 t4)) (ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) (lift h (S x1) x6))) (lift h x1 t4))) (\lambda -(t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind b) x4 x5)) t4))) (\lambda -(x7: T).(\lambda (H_x0: (eq T u2 (lift h x1 x7))).(\lambda (H16: (pr0 x4 -x7)).(eq_ind_r T (lift h x1 x7) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T -(THead (Bind b) t (THead (Flat Appl) (lift (S O) O v2) (lift h (S x1) x6))) -(lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind b) -x4 x5)) t4)))) (ex2_ind T (\lambda (t4: T).(eq T v2 (lift h x1 t4))) (\lambda -(t4: T).(pr0 x2 t4)) (ex2 T (\lambda (t4: T).(eq T (THead (Bind b) (lift h x1 -x7) (THead (Flat Appl) (lift (S O) O v2) (lift h (S x1) x6))) (lift h x1 -t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind b) x4 x5)) -t4))) (\lambda (x8: T).(\lambda (H_x1: (eq T v2 (lift h x1 x8))).(\lambda -(H17: (pr0 x2 x8)).(eq_ind_r T (lift h x1 x8) (\lambda (t: T).(ex2 T (\lambda -(t4: T).(eq T (THead (Bind b) (lift h x1 x7) (THead (Flat Appl) (lift (S O) O -t) (lift h (S x1) x6))) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat -Appl) x2 (THead (Bind b) x4 x5)) t4)))) (eq_ind T (lift h (plus (S O) x1) -(lift (S O) O x8)) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind -b) (lift h x1 x7) (THead (Flat Appl) t (lift h (S x1) x6))) (lift h x1 t4))) -(\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind b) x4 x5)) t4)))) -(eq_ind T (lift h (S x1) (THead (Flat Appl) (lift (S O) O x8) x6)) (\lambda -(t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) (lift h x1 x7) t) (lift -h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind b) x4 -x5)) t4)))) (ex_intro2 T (\lambda (t4: T).(eq T (THead (Bind b) (lift h x1 -x7) (lift h (S x1) (THead (Flat Appl) (lift (S O) O x8) x6))) (lift h x1 -t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind b) x4 x5)) -t4)) (THead (Bind b) x7 (THead (Flat Appl) (lift (S O) O x8) x6)) (sym_eq T -(lift h x1 (THead (Bind b) x7 (THead (Flat Appl) (lift (S O) O x8) x6))) -(THead (Bind b) (lift h x1 x7) (lift h (S x1) (THead (Flat Appl) (lift (S O) -O x8) x6))) (lift_bind b x7 (THead (Flat Appl) (lift (S O) O x8) x6) h x1)) -(pr0_upsilon b H1 x2 x8 H17 x4 x7 H16 x5 x6 H15)) (THead (Flat Appl) (lift h -(S x1) (lift (S O) O x8)) (lift h (S x1) x6)) (lift_flat Appl (lift (S O) O -x8) x6 h (S x1))) (lift (S O) O (lift h x1 x8)) (lift_d x8 h (S O) x1 O -(le_O_n x1))) v2 H_x1)))) (H3 x2 x1 H10)) u2 H_x0)))) (H5 x4 x1 H13)) t3 -H_x)))) (H7 x5 (S x1) H14)) x3 H12)))))) (lift_gen_bind b u1 t2 x3 h x1 H11)) -x0 H9)))))) (lift_gen_flat Appl v1 (THead (Bind b) u1 t2) x0 h x1 -H8))))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 -u2)).(\lambda (H2: ((\forall (x0: T).(\forall (x1: nat).((eq T u1 (lift h x1 -x0)) \to (ex2 T (\lambda (t2: T).(eq T u2 (lift h x1 t2))) (\lambda (t2: -T).(pr0 x0 t2)))))))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 -t3)).(\lambda (H4: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 -x0)) \to (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: -T).(pr0 x0 t4)))))))).(\lambda (w: T).(\lambda (H5: (subst0 O u2 t3 -w)).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H6: (eq T (THead (Bind -Abbr) u1 t2) (lift h x1 x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: -T).(eq T x0 (THead (Bind Abbr) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq -T u1 (lift h x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (S -x1) z)))) (ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) u2 w) (lift h x1 -t4))) (\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: T).(\lambda (x3: -T).(\lambda (H7: (eq T x0 (THead (Bind Abbr) x2 x3))).(\lambda (H8: (eq T u1 -(lift h x1 x2))).(\lambda (H9: (eq T t2 (lift h (S x1) x3))).(eq_ind_r T -(THead (Bind Abbr) x2 x3) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T -(THead (Bind Abbr) u2 w) (lift h x1 t4))) (\lambda (t4: T).(pr0 t t4)))) -(ex2_ind T (\lambda (t4: T).(eq T t3 (lift h (S x1) t4))) (\lambda (t4: -T).(pr0 x3 t4)) (ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) u2 w) (lift -h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind Abbr) x2 x3) t4))) (\lambda -(x4: T).(\lambda (H_x: (eq T t3 (lift h (S x1) x4))).(\lambda (H10: (pr0 x3 -x4)).(let H11 \def (eq_ind T t3 (\lambda (t: T).(subst0 O u2 t w)) H5 (lift h -(S x1) x4) H_x) in (ex2_ind T (\lambda (t4: T).(eq T u2 (lift h x1 t4))) -(\lambda (t4: T).(pr0 x2 t4)) (ex2 T (\lambda (t4: T).(eq T (THead (Bind -Abbr) u2 w) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind Abbr) x2 x3) -t4))) (\lambda (x5: T).(\lambda (H_x0: (eq T u2 (lift h x1 x5))).(\lambda -(H12: (pr0 x2 x5)).(eq_ind_r T (lift h x1 x5) (\lambda (t: T).(ex2 T (\lambda -(t4: T).(eq T (THead (Bind Abbr) t w) (lift h x1 t4))) (\lambda (t4: T).(pr0 -(THead (Bind Abbr) x2 x3) t4)))) (let H13 \def (eq_ind T u2 (\lambda (t: -T).(subst0 O t (lift h (S x1) x4) w)) H11 (lift h x1 x5) H_x0) in (let H14 -\def (refl_equal nat (S (plus O x1))) in (let H15 \def (eq_ind nat (S x1) -(\lambda (n: nat).(subst0 O (lift h x1 x5) (lift h n x4) w)) H13 (S (plus O -x1)) H14) in (ex2_ind T (\lambda (t4: T).(eq T w (lift h (S (plus O x1)) -t4))) (\lambda (t4: T).(subst0 O x5 x4 t4)) (ex2 T (\lambda (t4: T).(eq T -(THead (Bind Abbr) (lift h x1 x5) w) (lift h x1 t4))) (\lambda (t4: T).(pr0 -(THead (Bind Abbr) x2 x3) t4))) (\lambda (x6: T).(\lambda (H16: (eq T w (lift -h (S (plus O x1)) x6))).(\lambda (H17: (subst0 O x5 x4 x6)).(eq_ind_r T (lift -h (S (plus O x1)) x6) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead -(Bind Abbr) (lift h x1 x5) t) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead -(Bind Abbr) x2 x3) t4)))) (ex_intro2 T (\lambda (t4: T).(eq T (THead (Bind -Abbr) (lift h x1 x5) (lift h (S (plus O x1)) x6)) (lift h x1 t4))) (\lambda -(t4: T).(pr0 (THead (Bind Abbr) x2 x3) t4)) (THead (Bind Abbr) x5 x6) (sym_eq -T (lift h x1 (THead (Bind Abbr) x5 x6)) (THead (Bind Abbr) (lift h x1 x5) -(lift h (S (plus O x1)) x6)) (lift_bind Abbr x5 x6 h (plus O x1))) (pr0_delta -x2 x5 H12 x3 x4 H10 x6 H17)) w H16)))) (subst0_gen_lift_lt x5 x4 w O h x1 -H15))))) u2 H_x0)))) (H2 x2 x1 H8)))))) (H4 x3 (S x1) H9)) x0 H7)))))) -(lift_gen_bind Abbr u1 t2 x0 h x1 H6))))))))))))))) (\lambda (b: B).(\lambda -(H1: (not (eq B b Abst))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (pr0 -t2 t3)).(\lambda (H3: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift h -x1 x0)) \to (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: -T).(pr0 x0 t4)))))))).(\lambda (u: T).(\lambda (x0: T).(\lambda (x1: -nat).(\lambda (H4: (eq T (THead (Bind b) u (lift (S O) O t2)) (lift h x1 -x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Bind -b) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u (lift h x1 y0)))) -(\lambda (_: T).(\lambda (z: T).(eq T (lift (S O) O t2) (lift h (S x1) z)))) -(ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 -t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H5: (eq T x0 (THead (Bind -b) x2 x3))).(\lambda (_: (eq T u (lift h x1 x2))).(\lambda (H7: (eq T (lift -(S O) O t2) (lift h (S x1) x3))).(eq_ind_r T (THead (Bind b) x2 x3) (\lambda -(t: T).(ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: -T).(pr0 t t4)))) (let H8 \def (eq_ind_r nat (plus (S O) x1) (\lambda (n: -nat).(eq nat (S x1) n)) (refl_equal nat (plus (S O) x1)) (plus x1 (S O)) -(plus_comm x1 (S O))) in (let H9 \def (eq_ind nat (S x1) (\lambda (n: -nat).(eq T (lift (S O) O t2) (lift h n x3))) H7 (plus x1 (S O)) H8) in -(ex2_ind T (\lambda (t4: T).(eq T x3 (lift (S O) O t4))) (\lambda (t4: T).(eq -T t2 (lift h x1 t4))) (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) -(\lambda (t4: T).(pr0 (THead (Bind b) x2 x3) t4))) (\lambda (x4: T).(\lambda -(H10: (eq T x3 (lift (S O) O x4))).(\lambda (H11: (eq T t2 (lift h x1 -x4))).(eq_ind_r T (lift (S O) O x4) (\lambda (t: T).(ex2 T (\lambda (t4: -T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) x2 t) -t4)))) (ex2_ind T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: -T).(pr0 x4 t4)) (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda -(t4: T).(pr0 (THead (Bind b) x2 (lift (S O) O x4)) t4))) (\lambda (x5: -T).(\lambda (H_x: (eq T t3 (lift h x1 x5))).(\lambda (H12: (pr0 x4 -x5)).(eq_ind_r T (lift h x1 x5) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T -t (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) x2 (lift (S O) O -x4)) t4)))) (ex_intro2 T (\lambda (t4: T).(eq T (lift h x1 x5) (lift h x1 -t4))) (\lambda (t4: T).(pr0 (THead (Bind b) x2 (lift (S O) O x4)) t4)) x5 -(refl_equal T (lift h x1 x5)) (pr0_zeta b H1 x4 x5 H12 x2)) t3 H_x)))) (H3 x4 -x1 H11)) x3 H10)))) (lift_gen_lift t2 x3 (S O) h O x1 (le_O_n x1) H9)))) x0 -H5)))))) (lift_gen_bind b u (lift (S O) O t2) x0 h x1 H4)))))))))))) (\lambda -(t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 t3)).(\lambda (H2: ((\forall -(x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to (ex2 T (\lambda (t4: -T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4)))))))).(\lambda (u: -T).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H3: (eq T (THead (Flat Cast) -u t2) (lift h x1 x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T -x0 (THead (Flat Cast) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u (lift -h x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h x1 z)))) (ex2 T -(\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4))) -(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (eq T x0 (THead (Flat Cast) -x2 x3))).(\lambda (_: (eq T u (lift h x1 x2))).(\lambda (H6: (eq T t2 (lift h -x1 x3))).(eq_ind_r T (THead (Flat Cast) x2 x3) (\lambda (t: T).(ex2 T -(\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 t t4)))) -(ex2_ind T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 -x3 t4)) (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: -T).(pr0 (THead (Flat Cast) x2 x3) t4))) (\lambda (x4: T).(\lambda (H_x: (eq T -t3 (lift h x1 x4))).(\lambda (H7: (pr0 x3 x4)).(eq_ind_r T (lift h x1 x4) -(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T t (lift h x1 t4))) (\lambda -(t4: T).(pr0 (THead (Flat Cast) x2 x3) t4)))) (ex_intro2 T (\lambda (t4: -T).(eq T (lift h x1 x4) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat -Cast) x2 x3) t4)) x4 (refl_equal T (lift h x1 x4)) (pr0_epsilon x3 x4 H7 x2)) -t3 H_x)))) (H2 x3 x1 H6)) x0 H4)))))) (lift_gen_flat Cast u t2 x0 h x1 -H3)))))))))) y x H0))))) H))))). +. diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr2/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr2/props.ma index a4de3fd63..793288eda 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr2/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr2/props.ma @@ -233,6 +233,56 @@ T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u0 t4 t)).(pr2_delta (CTail k u c0) (CTail k u d) u0 i (getl_ctail Abbr c0 d u0 i H0 k u) t3 t4 H1 t H2))))))))))) c t1 t2 H)))))). +theorem pr2_change: + \forall (b: B).((not (eq B b Abbr)) \to (\forall (c: C).(\forall (v1: +T).(\forall (t1: T).(\forall (t2: T).((pr2 (CHead c (Bind b) v1) t1 t2) \to +(\forall (v2: T).(pr2 (CHead c (Bind b) v2) t1 t2)))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abbr))).(\lambda (c: C).(\lambda +(v1: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr2 (CHead c (Bind +b) v1) t1 t2)).(\lambda (v2: T).(insert_eq C (CHead c (Bind b) v1) (\lambda +(c0: C).(pr2 c0 t1 t2)) (pr2 (CHead c (Bind b) v2) t1 t2) (\lambda (y: +C).(\lambda (H1: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: +T).(\lambda (t0: T).((eq C c0 (CHead c (Bind b) v1)) \to (pr2 (CHead c (Bind +b) v2) t t0))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda +(H2: (pr0 t3 t4)).(\lambda (_: (eq C c0 (CHead c (Bind b) v1))).(pr2_free +(CHead c (Bind b) v2) t3 t4 H2)))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H2: (getl i c0 (CHead d (Bind +Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 +t4)).(\lambda (t: T).(\lambda (H4: (subst0 i u t4 t)).(\lambda (H5: (eq C c0 +(CHead c (Bind b) v1))).(let H6 \def (eq_ind C c0 (\lambda (c1: C).(getl i c1 +(CHead d (Bind Abbr) u))) H2 (CHead c (Bind b) v1) H5) in (nat_ind (\lambda +(n: nat).((getl n (CHead c (Bind b) v1) (CHead d (Bind Abbr) u)) \to ((subst0 +n u t4 t) \to (pr2 (CHead c (Bind b) v2) t3 t)))) (\lambda (H7: (getl O +(CHead c (Bind b) v1) (CHead d (Bind Abbr) u))).(\lambda (H8: (subst0 O u t4 +t)).(let H9 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda +(_: C).C) with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) +(CHead d (Bind Abbr) u) (CHead c (Bind b) v1) (clear_gen_bind b c (CHead d +(Bind Abbr) u) v1 (getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) +H7))) in ((let H10 \def (f_equal C B (\lambda (e: C).(match e in C return +(\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) +\Rightarrow (match k in K return (\lambda (_: K).B) with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) +(CHead c (Bind b) v1) (clear_gen_bind b c (CHead d (Bind Abbr) u) v1 +(getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) H7))) in ((let H11 +\def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) +with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d +(Bind Abbr) u) (CHead c (Bind b) v1) (clear_gen_bind b c (CHead d (Bind Abbr) +u) v1 (getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) H7))) in +(\lambda (H12: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H14 \def (eq_ind +T u (\lambda (t0: T).(subst0 O t0 t4 t)) H8 v1 H11) in (let H15 \def +(eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abbr))) H Abbr H12) in (eq_ind B +Abbr (\lambda (b0: B).(pr2 (CHead c (Bind b0) v2) t3 t)) (let H16 \def (match +(H15 (refl_equal B Abbr)) in False return (\lambda (_: False).(pr2 (CHead c +(Bind Abbr) v2) t3 t)) with []) in H16) b H12)))))) H10)) H9)))) (\lambda +(i0: nat).(\lambda (_: (((getl i0 (CHead c (Bind b) v1) (CHead d (Bind Abbr) +u)) \to ((subst0 i0 u t4 t) \to (pr2 (CHead c (Bind b) v2) t3 t))))).(\lambda +(H7: (getl (S i0) (CHead c (Bind b) v1) (CHead d (Bind Abbr) u))).(\lambda +(H8: (subst0 (S i0) u t4 t)).(pr2_delta (CHead c (Bind b) v2) d u (S i0) +(getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) (getl_gen_S (Bind b) c +(CHead d (Bind Abbr) u) v1 i0 H7) v2) t3 t4 H3 t H8))))) i H6 H4))))))))))))) +y t1 t2 H1))) H0)))))))). + theorem pr2_lift: \forall (c: C).(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to (\forall (t1: T).(\forall (t2: T).((pr2 e t1 t2) \to (pr2 c (lift diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/defs.ma index 69266bbb1..5e14a9fc6 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/defs.ma @@ -18,7 +18,7 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/defs". include "pr2/defs.ma". -inductive pr3 (c:C): T \to (T \to Prop) \def +inductive pr3 (c: C): T \to (T \to Prop) \def | pr3_refl: \forall (t: T).(pr3 c t t) | pr3_sing: \forall (t2: T).(\forall (t1: T).((pr2 c t1 t2) \to (\forall (t3: T).((pr3 c t2 t3) \to (pr3 c t1 t3))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/fwd.ma index 6c0e84a66..b1705e99f 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/fwd.ma @@ -1469,3 +1469,91 @@ y2) z1 z2))))))) x2 x3 x4 x5 x6 x7 H8 (pr3_refl c (THead (Bind x2) x3 x4)) H15 (pr3_pr2 c x0 x6 H11) (pr3_pr2 c x3 x7 H12) (pr3_pr2 (CHead c (Bind x2) x7) x4 x5 H13))))) x1 H9))))))))))))) H7)) H6)))))))))))) y x H0))))) H))))). +theorem pr3_gen_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u1: +T).(\forall (t1: T).(\forall (x: T).((pr3 c (THead (Bind b) u1 t1) x) \to (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind b) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr3 (CHead c (Bind b) u1) t1 t2)))) (pr3 (CHead c (Bind +b) u1) t1 (lift (S O) O x))))))))) +\def + \lambda (b: B).(B_ind (\lambda (b0: B).((not (eq B b0 Abst)) \to (\forall +(c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c (THead (Bind +b0) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x +(THead (Bind b0) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b0) u1) t1 t2)))) (pr3 +(CHead c (Bind b0) u1) t1 (lift (S O) O x)))))))))) (\lambda (_: (not (eq B +Abbr Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: +T).(\lambda (H0: (pr3 c (THead (Bind Abbr) u1 t1) x)).(let H1 \def +(pr3_gen_abbr c u1 t1 x H0) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) +u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) (or (ex3_2 T +T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda +(t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) +t1 (lift (S O) O x))) (\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 +c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 +t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind +Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))) (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda +(t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) +t1 (lift (S O) O x))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T x +(THead (Bind Abbr) x0 x1))).(\lambda (H4: (pr3 c u1 x0)).(\lambda (H5: (pr3 +(CHead c (Bind Abbr) u1) t1 x1)).(or_introl (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S +O) O x)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead +(Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))) x0 x1 +H3 H4 H5))))))) H2)) (\lambda (H2: (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S +O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x +(THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 +(CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) H2)) H1)))))))) (\lambda (H: +(not (eq B Abst Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: +T).(\lambda (x: T).(\lambda (_: (pr3 c (THead (Bind Abst) u1 t1) x)).(let H1 +\def (match (H (refl_equal B Abst)) in False return (\lambda (_: False).(or +(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr3 (CHead c (Bind Abst) u1) t1 t2)))) (pr3 (CHead c +(Bind Abst) u1) t1 (lift (S O) O x)))) with []) in H1))))))) (\lambda (_: +(not (eq B Void Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: +T).(\lambda (x: T).(\lambda (H0: (pr3 c (THead (Bind Void) u1 t1) x)).(let H1 +\def (pr3_gen_void c u1 t1 x H0) in (or_ind (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall +(b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t1 t2)))))) (pr3 (CHead c +(Bind Void) u1) t1 (lift (S O) O x)) (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) +u1) t1 t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x))) (\lambda +(H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) +u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) +u) t1 t2))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x +(THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead +c (Bind b0) u) t1 t2))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 +c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 +t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H3: (eq T x (THead (Bind Void) x0 +x1))).(\lambda (H4: (pr3 c u1 x0)).(\lambda (H5: ((\forall (b0: B).(\forall +(u: T).(pr3 (CHead c (Bind b0) u) t1 x1))))).(or_introl (ex3_2 T T (\lambda +(u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind Void) u1) t1 t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S +O) O x)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead +(Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 t2))) x0 x1 +H3 H4 (H5 Void u1)))))))) H2)) (\lambda (H2: (pr3 (CHead c (Bind Void) u1) t1 +(lift (S O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 +c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 +t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x)) H2)) H1)))))))) b). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/iso.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/iso.ma index 4b3519cd9..99a06b1a6 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/iso.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/iso.ma @@ -18,7 +18,189 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/iso". include "pr3/fwd.ma". -include "iso/fwd.ma". +include "iso/props.ma". + +include "tlist/props.ma". + +theorem pr3_iso_appls_abbr: + \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) w)) \to (\forall (vs: TList).(let u1 \def (THeads (Flat +Appl) vs (TLRef i)) in (\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to +(\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) vs (lift (S i) O w)) +u2)))))))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (vs: TList).(TList_ind +(\lambda (t: TList).(let u1 \def (THeads (Flat Appl) t (TLRef i)) in (\forall +(u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to +(pr3 c (THeads (Flat Appl) t (lift (S i) O w)) u2)))))) (\lambda (u2: +T).(\lambda (H0: (pr3 c (TLRef i) u2)).(\lambda (H1: (((iso (TLRef i) u2) \to +(\forall (P: Prop).P)))).(let H2 \def (pr3_gen_lref c u2 i H0) in (or_ind (eq +T u2 (TLRef i)) (ex3_3 C T T (\lambda (d0: C).(\lambda (u: T).(\lambda (_: +T).(getl i c (CHead d0 (Bind Abbr) u))))) (\lambda (d0: C).(\lambda (u: +T).(\lambda (v: T).(pr3 d0 u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(v: T).(eq T u2 (lift (S i) O v)))))) (pr3 c (lift (S i) O w) u2) (\lambda +(H3: (eq T u2 (TLRef i))).(let H4 \def (eq_ind T u2 (\lambda (t: T).((iso +(TLRef i) t) \to (\forall (P: Prop).P))) H1 (TLRef i) H3) in (eq_ind_r T +(TLRef i) (\lambda (t: T).(pr3 c (lift (S i) O w) t)) (H4 (iso_refl (TLRef +i)) (pr3 c (lift (S i) O w) (TLRef i))) u2 H3))) (\lambda (H3: (ex3_3 C T T +(\lambda (d0: C).(\lambda (u: T).(\lambda (_: T).(getl i c (CHead d0 (Bind +Abbr) u))))) (\lambda (d0: C).(\lambda (u: T).(\lambda (v: T).(pr3 d0 u v)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T u2 (lift (S i) O +v))))))).(ex3_3_ind C T T (\lambda (d0: C).(\lambda (u: T).(\lambda (_: +T).(getl i c (CHead d0 (Bind Abbr) u))))) (\lambda (d0: C).(\lambda (u: +T).(\lambda (v: T).(pr3 d0 u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(v: T).(eq T u2 (lift (S i) O v))))) (pr3 c (lift (S i) O w) u2) (\lambda +(x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H4: (getl i c (CHead x0 +(Bind Abbr) x1))).(\lambda (H5: (pr3 x0 x1 x2)).(\lambda (H6: (eq T u2 (lift +(S i) O x2))).(let H7 \def (eq_ind T u2 (\lambda (t: T).((iso (TLRef i) t) +\to (\forall (P: Prop).P))) H1 (lift (S i) O x2) H6) in (eq_ind_r T (lift (S +i) O x2) (\lambda (t: T).(pr3 c (lift (S i) O w) t)) (let H8 \def (eq_ind C +(CHead d (Bind Abbr) w) (\lambda (c0: C).(getl i c c0)) H (CHead x0 (Bind +Abbr) x1) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x0 (Bind Abbr) x1) +H4)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e in C return +(\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow +c0])) (CHead d (Bind Abbr) w) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d +(Bind Abbr) w) i H (CHead x0 (Bind Abbr) x1) H4)) in ((let H10 \def (f_equal +C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) +\Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) w) (CHead +x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x0 (Bind +Abbr) x1) H4)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 +(\lambda (t: T).(getl i c (CHead x0 (Bind Abbr) t))) H8 w H10) in (let H13 +\def (eq_ind_r T x1 (\lambda (t: T).(pr3 x0 t x2)) H5 w H10) in (let H14 \def +(eq_ind_r C x0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) w))) H12 d +H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c0: C).(pr3 c0 w x2)) H13 d +H11) in (pr3_lift c d (S i) O (getl_drop Abbr c d w i H14) w x2 H15))))))) +H9))) u2 H6)))))))) H3)) H2))))) (\lambda (t: T).(\lambda (t0: +TList).(\lambda (H0: ((\forall (u2: T).((pr3 c (THeads (Flat Appl) t0 (TLRef +i)) u2) \to ((((iso (THeads (Flat Appl) t0 (TLRef i)) u2) \to (\forall (P: +Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (lift (S i) O w)) +u2)))))).(\lambda (u2: T).(\lambda (H1: (pr3 c (THead (Flat Appl) t (THeads +(Flat Appl) t0 (TLRef i))) u2)).(\lambda (H2: (((iso (THead (Flat Appl) t +(THeads (Flat Appl) t0 (TLRef i))) u2) \to (\forall (P: Prop).P)))).(let H3 +\def (pr3_gen_appl c t (THeads (Flat Appl) t0 (TLRef i)) u2 H1) in (or3_ind +(ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 +t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: +T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) t2)))) (ex4_4 T +T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 +c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t +u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c (THead (Flat Appl) t +(THeads (Flat Appl) t0 (lift (S i) O w))) u2) (\lambda (H4: (ex3_2 T T +(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: +T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) t2))))).(ex3_2_ind T T (\lambda +(u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c +(THeads (Flat Appl) t0 (TLRef i)) t2))) (pr3 c (THead (Flat Appl) t (THeads +(Flat Appl) t0 (lift (S i) O w))) u2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H5: (eq T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c t +x0)).(\lambda (_: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) x1)).(let H8 \def +(eq_ind T u2 (\lambda (t1: T).((iso (THead (Flat Appl) t (THeads (Flat Appl) +t0 (TLRef i))) t1) \to (\forall (P: Prop).P))) H2 (THead (Flat Appl) x0 x1) +H5) in (eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t1: T).(pr3 c (THead +(Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) t1)) (H8 (iso_head t +x0 (THeads (Flat Appl) t0 (TLRef i)) x1 (Flat Appl)) (pr3 c (THead (Flat +Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) (THead (Flat Appl) x0 x1))) +u2 H5))))))) H4)) (\lambda (H4: (ex4_4 T T T T (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t +u3))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T +T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 +c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O +w))) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (H5: (pr3 c (THead (Bind Abbr) x2 x3) u2)).(\lambda (H6: (pr3 c t +x2)).(\lambda (H7: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind +Abst) x0 x1))).(\lambda (H8: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c +(Bind b) u) x1 x3))))).(pr3_t (THead (Bind Abbr) t x1) (THead (Flat Appl) t +(THeads (Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Flat Appl) t +(THead (Bind Abst) x0 x1)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift +(S i) O w))) c (pr3_thin_dx c (THeads (Flat Appl) t0 (lift (S i) O w)) (THead +(Bind Abst) x0 x1) (H0 (THead (Bind Abst) x0 x1) H7 (\lambda (H9: (iso +(THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) x0 x1))).(\lambda (P: +Prop).(iso_flats_lref_bind_false Appl Abst i x0 x1 t0 H9 P)))) t Appl) (THead +(Bind Abbr) t x1) (pr3_pr2 c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) +(THead (Bind Abbr) t x1) (pr2_free c (THead (Flat Appl) t (THead (Bind Abst) +x0 x1)) (THead (Bind Abbr) t x1) (pr0_beta x0 t t (pr0_refl t) x1 x1 +(pr0_refl x1))))) u2 (pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) t +x1) c (pr3_head_12 c t x2 H6 (Bind Abbr) x1 x3 (H8 Abbr x2)) u2 H5)))))))))) +H4)) (\lambda (H4: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind +B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 +(CHead c (Bind b) y2) z1 z2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat +Appl) t0 (lift (S i) O w))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda +(x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H5: (not +(eq B x0 Abst))).(\lambda (H6: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) +(THead (Bind x0) x1 x2))).(\lambda (H7: (pr3 c (THead (Bind x0) x5 (THead +(Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (H8: (pr3 c t x4)).(\lambda +(H9: (pr3 c x1 x5)).(\lambda (H10: (pr3 (CHead c (Bind x0) x5) x2 x3)).(pr3_t +(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (THead (Flat +Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Bind x0) +x1 (THead (Flat Appl) (lift (S O) O t) x2)) (THead (Flat Appl) t (THeads +(Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Flat Appl) t (THead (Bind +x0) x1 x2)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) c +(pr3_thin_dx c (THeads (Flat Appl) t0 (lift (S i) O w)) (THead (Bind x0) x1 +x2) (H0 (THead (Bind x0) x1 x2) H6 (\lambda (H11: (iso (THeads (Flat Appl) t0 +(TLRef i)) (THead (Bind x0) x1 x2))).(\lambda (P: +Prop).(iso_flats_lref_bind_false Appl x0 i x1 x2 t0 H11 P)))) t Appl) (THead +(Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr3_pr2 c (THead (Flat +Appl) t (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) (lift +(S O) O t) x2)) (pr2_free c (THead (Flat Appl) t (THead (Bind x0) x1 x2)) +(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr0_upsilon x0 +H5 t t (pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2))))) (THead (Bind +x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (pr3_head_12 c x1 x1 +(pr3_refl c x1) (Bind x0) (THead (Flat Appl) (lift (S O) O t) x2) (THead +(Flat Appl) (lift (S O) O x4) x2) (pr3_head_12 (CHead c (Bind x0) x1) (lift +(S O) O t) (lift (S O) O x4) (pr3_lift (CHead c (Bind x0) x1) c (S O) O +(drop_drop (Bind x0) O c c (drop_refl c) x1) t x4 H8) (Flat Appl) x2 x2 +(pr3_refl (CHead (CHead c (Bind x0) x1) (Flat Appl) (lift (S O) O x4)) x2)))) +u2 (pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) +(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) c (pr3_head_12 +c x1 x5 H9 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) (THead (Flat +Appl) (lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H10 +(lift (S O) O x4) Appl)) u2 H7)))))))))))))) H4)) H3)))))))) vs)))))). theorem pr3_iso_appls_cast: \forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (vs: TList).(let u1 @@ -180,3 +362,775 @@ O) O x4) x3)) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) c (THead (Flat Appl) (lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H9 (lift (S O) O x4) Appl)) u2 H6)))))))))))))) H3)) H2)))))))) vs)))). +theorem pr3_iso_appl_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (v1: T).(\forall (v2: +T).(\forall (t: T).(let u1 \def (THead (Flat Appl) v1 (THead (Bind b) v2 t)) +in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to +(\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) v2 (THead (Flat Appl) +(lift (S O) O v1) t)) u2)))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (v1: T).(\lambda +(v2: T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H0: (pr3 c +(THead (Flat Appl) v1 (THead (Bind b) v2 t)) u2)).(\lambda (H1: (((iso (THead +(Flat Appl) v1 (THead (Bind b) v2 t)) u2) \to (\forall (P: Prop).P)))).(let +H2 \def (pr3_gen_appl c v1 (THead (Bind b) v2 t) u2 H0) in (or3_ind (ex3_2 T +T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda +(t2: T).(pr3 c (THead (Bind b) v2 t) t2)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c v1 u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) z1 +t2)))))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) +(\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind b0) y1 +z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: +T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) y2 (THead (Flat +Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 +u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b0: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2)))))))) (pr3 c (THead (Bind b) v2 +(THead (Flat Appl) (lift (S O) O v1) t)) u2) (\lambda (H3: (ex3_2 T T +(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda +(t2: T).(pr3 c (THead (Bind b) v2 t) t2))))).(ex3_2_ind T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c +(THead (Bind b) v2 t) t2))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) +(lift (S O) O v1) t)) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq +T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c v1 x0)).(\lambda (_: +(pr3 c (THead (Bind b) v2 t) x1)).(let H7 \def (eq_ind T u2 (\lambda (t0: +T).((iso (THead (Flat Appl) v1 (THead (Bind b) v2 t)) t0) \to (\forall (P: +Prop).P))) H1 (THead (Flat Appl) x0 x1) H4) in (eq_ind_r T (THead (Flat Appl) +x0 x1) (\lambda (t0: T).(pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S +O) O v1) t)) t0)) (H7 (iso_head v1 x0 (THead (Bind b) v2 t) x1 (Flat Appl)) +(pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead +(Flat Appl) x0 x1))) u2 H4))))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda +(_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c v1 u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) z1 +t2))))))))).(ex4_4_ind T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))))) +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THead (Bind b) v2 t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: +T).(pr3 (CHead c (Bind b0) u) z1 t2))))))) (pr3 c (THead (Bind b) v2 (THead +(Flat Appl) (lift (S O) O v1) t)) u2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (pr3 c (THead (Bind Abbr) +x2 x3) u2)).(\lambda (H5: (pr3 c v1 x2)).(\lambda (H6: (pr3 c (THead (Bind b) +v2 t) (THead (Bind Abst) x0 x1))).(\lambda (H7: ((\forall (b0: B).(\forall +(u: T).(pr3 (CHead c (Bind b0) u) x1 x3))))).(pr3_t (THead (Bind Abbr) x2 x3) +(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) c (let H_x \def +(pr3_gen_bind b H c v2 t (THead (Bind Abst) x0 x1) H6) in (let H8 \def H_x in +(or_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind Abst) +x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v2 +u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b) v2) t t2)))) +(pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind Abst) x0 x1))) (pr3 c +(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind +Abbr) x2 x3)) (\lambda (H9: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq +T (THead (Bind Abst) x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind b) v2) t t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: +T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind b) v2) t t2))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) +(lift (S O) O v1) t)) (THead (Bind Abbr) x2 x3)) (\lambda (x4: T).(\lambda +(x5: T).(\lambda (H10: (eq T (THead (Bind Abst) x0 x1) (THead (Bind b) x4 +x5))).(\lambda (H11: (pr3 c v2 x4)).(\lambda (H12: (pr3 (CHead c (Bind b) v2) +t x5)).(let H13 \def (f_equal T B (\lambda (e: T).(match e in T return +(\lambda (_: T).B) with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow +Abst | (THead k _ _) \Rightarrow (match k in K return (\lambda (_: K).B) with +[(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abst])])) (THead (Bind Abst) +x0 x1) (THead (Bind b) x4 x5) H10) in ((let H14 \def (f_equal T T (\lambda +(e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 +| (TLRef _) \Rightarrow x0 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind +Abst) x0 x1) (THead (Bind b) x4 x5) H10) in ((let H15 \def (f_equal T T +(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) +\Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t0) \Rightarrow t0])) +(THead (Bind Abst) x0 x1) (THead (Bind b) x4 x5) H10) in (\lambda (H16: (eq T +x0 x4)).(\lambda (H17: (eq B Abst b)).(let H18 \def (eq_ind_r T x5 (\lambda +(t0: T).(pr3 (CHead c (Bind b) v2) t t0)) H12 x1 H15) in (let H19 \def +(eq_ind_r T x4 (\lambda (t0: T).(pr3 c v2 t0)) H11 x0 H16) in (let H20 \def +(eq_ind_r B b (\lambda (b0: B).(pr3 (CHead c (Bind b0) v2) t x1)) H18 Abst +H17) in (let H21 \def (eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abst))) H +Abst H17) in (eq_ind B Abst (\lambda (b0: B).(pr3 c (THead (Bind b0) v2 +(THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind Abbr) x2 x3))) (let H22 +\def (match (H21 (refl_equal B Abst)) in False return (\lambda (_: +False).(pr3 c (THead (Bind Abst) v2 (THead (Flat Appl) (lift (S O) O v1) t)) +(THead (Bind Abbr) x2 x3))) with []) in H22) b H17)))))))) H14)) H13))))))) +H9)) (\lambda (H9: (pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind +Abst) x0 x1)))).(pr3_t (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O +x2) (lift (S O) O (THead (Bind Abst) x0 x1)))) (THead (Bind b) v2 (THead +(Flat Appl) (lift (S O) O v1) t)) c (pr3_head_2 c v2 (THead (Flat Appl) (lift +(S O) O v1) t) (THead (Flat Appl) (lift (S O) O x2) (lift (S O) O (THead +(Bind Abst) x0 x1))) (Bind b) (pr3_flat (CHead c (Bind b) v2) (lift (S O) O +v1) (lift (S O) O x2) (pr3_lift (CHead c (Bind b) v2) c (S O) O (drop_drop +(Bind b) O c c (drop_refl c) v2) v1 x2 H5) t (lift (S O) O (THead (Bind Abst) +x0 x1)) H9 Appl)) (THead (Bind Abbr) x2 x3) (eq_ind T (lift (S O) O (THead +(Flat Appl) x2 (THead (Bind Abst) x0 x1))) (\lambda (t0: T).(pr3 c (THead +(Bind b) v2 t0) (THead (Bind Abbr) x2 x3))) (pr3_sing c (THead (Bind Abbr) x2 +x1) (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) x2 (THead (Bind Abst) +x0 x1)))) (pr2_free c (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) x2 +(THead (Bind Abst) x0 x1)))) (THead (Bind Abbr) x2 x1) (pr0_zeta b H (THead +(Flat Appl) x2 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) x2 x1) (pr0_beta +x0 x2 x2 (pr0_refl x2) x1 x1 (pr0_refl x1)) v2)) (THead (Bind Abbr) x2 x3) +(pr3_head_12 c x2 x2 (pr3_refl c x2) (Bind Abbr) x1 x3 (H7 Abbr x2))) (THead +(Flat Appl) (lift (S O) O x2) (lift (S O) O (THead (Bind Abst) x0 x1))) +(lift_flat Appl x2 (THead (Bind Abst) x0 x1) (S O) O)))) H8))) u2 H4))))))))) +H3)) (\lambda (H3: (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead +(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c v1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))))).(ex6_6_ind +B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind b0) y1 z1)))))))) (\lambda +(b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: +T).(\lambda (y2: T).(pr3 c (THead (Bind b0) y2 (THead (Flat Appl) (lift (S O) +O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) +y2) z1 z2))))))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O +v1) t)) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H4: (not (eq B x0 +Abst))).(\lambda (H5: (pr3 c (THead (Bind b) v2 t) (THead (Bind x0) x1 +x2))).(\lambda (H6: (pr3 c (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) +O x4) x3)) u2)).(\lambda (H7: (pr3 c v1 x4)).(\lambda (H8: (pr3 c x1 +x5)).(\lambda (H9: (pr3 (CHead c (Bind x0) x5) x2 x3)).(pr3_t (THead (Bind +x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (THead (Bind b) v2 (THead +(Flat Appl) (lift (S O) O v1) t)) c (let H_x \def (pr3_gen_bind b H c v2 t +(THead (Bind x0) x1 x2) H5) in (let H10 \def H_x in (or_ind (ex3_2 T T +(\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: +T).(\lambda (t2: T).(pr3 (CHead c (Bind b) v2) t t2)))) (pr3 (CHead c (Bind +b) v2) t (lift (S O) O (THead (Bind x0) x1 x2))) (pr3 c (THead (Bind b) v2 +(THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind x0) x5 (THead (Flat +Appl) (lift (S O) O x4) x3))) (\lambda (H11: (ex3_2 T T (\lambda (u3: +T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda +(t2: T).(pr3 (CHead c (Bind b) v2) t t2))))).(ex3_2_ind T T (\lambda (u3: +T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda +(t2: T).(pr3 (CHead c (Bind b) v2) t t2))) (pr3 c (THead (Bind b) v2 (THead +(Flat Appl) (lift (S O) O v1) t)) (THead (Bind x0) x5 (THead (Flat Appl) +(lift (S O) O x4) x3))) (\lambda (x6: T).(\lambda (x7: T).(\lambda (H12: (eq +T (THead (Bind x0) x1 x2) (THead (Bind b) x6 x7))).(\lambda (H13: (pr3 c v2 +x6)).(\lambda (H14: (pr3 (CHead c (Bind b) v2) t x7)).(let H15 \def (f_equal +T B (\lambda (e: T).(match e in T return (\lambda (_: T).B) with [(TSort _) +\Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead k _ _) \Rightarrow (match +k in K return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow x0])])) (THead (Bind x0) x1 x2) (THead (Bind b) x6 x7) H12) in +((let H16 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: +T).T) with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ t0 +_) \Rightarrow t0])) (THead (Bind x0) x1 x2) (THead (Bind b) x6 x7) H12) in +((let H17 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: +T).T) with [(TSort _) \Rightarrow x2 | (TLRef _) \Rightarrow x2 | (THead _ _ +t0) \Rightarrow t0])) (THead (Bind x0) x1 x2) (THead (Bind b) x6 x7) H12) in +(\lambda (H18: (eq T x1 x6)).(\lambda (H19: (eq B x0 b)).(let H20 \def +(eq_ind_r T x7 (\lambda (t0: T).(pr3 (CHead c (Bind b) v2) t t0)) H14 x2 H17) +in (let H21 \def (eq_ind_r T x6 (\lambda (t0: T).(pr3 c v2 t0)) H13 x1 H18) +in (let H22 \def (eq_ind B x0 (\lambda (b0: B).(pr3 (CHead c (Bind b0) x5) x2 +x3)) H9 b H19) in (let H23 \def (eq_ind B x0 (\lambda (b0: B).(not (eq B b0 +Abst))) H4 b H19) in (eq_ind_r B b (\lambda (b0: B).(pr3 c (THead (Bind b) v2 +(THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind b0) x5 (THead (Flat +Appl) (lift (S O) O x4) x3)))) (pr3_head_21 c v2 x5 (pr3_t x1 v2 c H21 x5 H8) +(Bind b) (THead (Flat Appl) (lift (S O) O v1) t) (THead (Flat Appl) (lift (S +O) O x4) x3) (pr3_flat (CHead c (Bind b) v2) (lift (S O) O v1) (lift (S O) O +x4) (pr3_lift (CHead c (Bind b) v2) c (S O) O (drop_drop (Bind b) O c c +(drop_refl c) v2) v1 x4 H7) t x3 (pr3_t x2 t (CHead c (Bind b) v2) H20 x3 +(pr3_pr3_pr3_t c v2 x1 H21 x2 x3 (Bind b) (pr3_pr3_pr3_t c x1 x5 H8 x2 x3 +(Bind b) H22))) Appl)) x0 H19)))))))) H16)) H15))))))) H11)) (\lambda (H11: +(pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind x0) x1 x2)))).(pr3_t +(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O x4) (lift (S O) O (THead +(Bind x0) x1 x2)))) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) +t)) c (pr3_head_2 c v2 (THead (Flat Appl) (lift (S O) O v1) t) (THead (Flat +Appl) (lift (S O) O x4) (lift (S O) O (THead (Bind x0) x1 x2))) (Bind b) +(pr3_flat (CHead c (Bind b) v2) (lift (S O) O v1) (lift (S O) O x4) (pr3_lift +(CHead c (Bind b) v2) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) v2) +v1 x4 H7) t (lift (S O) O (THead (Bind x0) x1 x2)) H11 Appl)) (THead (Bind +x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (eq_ind T (lift (S O) O +(THead (Flat Appl) x4 (THead (Bind x0) x1 x2))) (\lambda (t0: T).(pr3 c +(THead (Bind b) v2 t0) (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O +x4) x3)))) (pr3_sing c (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O +x4) x2)) (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) x4 (THead (Bind +x0) x1 x2)))) (pr2_free c (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) +x4 (THead (Bind x0) x1 x2)))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S +O) O x4) x2)) (pr0_zeta b H (THead (Flat Appl) x4 (THead (Bind x0) x1 x2)) +(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (pr0_upsilon x0 +H4 x4 x4 (pr0_refl x4) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2)) v2)) (THead +(Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (pr3_head_12 c x1 x5 +H8 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) (THead (Flat Appl) +(lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H9 (lift (S +O) O x4) Appl))) (THead (Flat Appl) (lift (S O) O x4) (lift (S O) O (THead +(Bind x0) x1 x2))) (lift_flat Appl x4 (THead (Bind x0) x1 x2) (S O) O)))) +H10))) u2 H6))))))))))))) H3)) H2)))))))))). + +theorem pr3_iso_appls_appl_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (v: T).(\forall (u: +T).(\forall (t: T).(\forall (vs: TList).(let u1 \def (THeads (Flat Appl) vs +(THead (Flat Appl) v (THead (Bind b) u t))) in (\forall (c: C).(\forall (u2: +T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c +(THeads (Flat Appl) vs (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) +t))) u2))))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (v: T).(\lambda +(u: T).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: +TList).(let u1 \def (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind +b) u t))) in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 +u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (THead +(Bind b) u (THead (Flat Appl) (lift (S O) O v) t))) u2))))))) (\lambda (c: +C).(\lambda (u2: T).(\lambda (H0: (pr3 c (THead (Flat Appl) v (THead (Bind b) +u t)) u2)).(\lambda (H1: (((iso (THead (Flat Appl) v (THead (Bind b) u t)) +u2) \to (\forall (P: Prop).P)))).(pr3_iso_appl_bind b H v u t c u2 H0 H1))))) +(\lambda (t0: T).(\lambda (t1: TList).(\lambda (H0: ((\forall (c: C).(\forall +(u2: T).((pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u +t))) u2) \to ((((iso (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind +b) u t))) u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t1 +(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t))) u2))))))).(\lambda +(c: C).(\lambda (u2: T).(\lambda (H1: (pr3 c (THead (Flat Appl) t0 (THeads +(Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t)))) u2)).(\lambda +(H2: (((iso (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Flat Appl) v +(THead (Bind b) u t)))) u2) \to (\forall (P: Prop).P)))).(let H3 \def +(pr3_gen_appl c t0 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind +b) u t))) u2 H1) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq +T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 +u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead +(Flat Appl) v (THead (Bind b) u t))) t2)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat +Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: +B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2)))))))) (ex6_6 B T T T +T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) (THead +(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2)))))))) (pr3 c +(THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat +Appl) (lift (S O) O v) t)))) u2) (\lambda (H4: (ex3_2 T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c t0 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c +(THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) +t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead +(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))) +(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat +Appl) v (THead (Bind b) u t))) t2))) (pr3 c (THead (Flat Appl) t0 (THeads +(Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) +u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T u2 (THead (Flat +Appl) x0 x1))).(\lambda (_: (pr3 c t0 x0)).(\lambda (_: (pr3 c (THeads (Flat +Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) x1)).(let H8 \def +(eq_ind T u2 (\lambda (t2: T).((iso (THead (Flat Appl) t0 (THeads (Flat Appl) +t1 (THead (Flat Appl) v (THead (Bind b) u t)))) t2) \to (\forall (P: +Prop).P))) H2 (THead (Flat Appl) x0 x1) H5) in (eq_ind_r T (THead (Flat Appl) +x0 x1) (\lambda (t2: T).(pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 +(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) t2)) (H8 +(iso_head t0 x0 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u +t))) x1 (Flat Appl)) (pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 +(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) (THead (Flat +Appl) x0 x1))) u2 H5))))))) H4)) (\lambda (H4: (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat +Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: +B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2))))))))).(ex4_4_ind T T +T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c +(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat +Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: +B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2))))))) (pr3 c (THead +(Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) +(lift (S O) O v) t)))) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: +T).(\lambda (x3: T).(\lambda (H5: (pr3 c (THead (Bind Abbr) x2 x3) +u2)).(\lambda (H6: (pr3 c t0 x2)).(\lambda (H7: (pr3 c (THeads (Flat Appl) t1 +(THead (Flat Appl) v (THead (Bind b) u t))) (THead (Bind Abst) x0 +x1))).(\lambda (H8: ((\forall (b0: B).(\forall (u0: T).(pr3 (CHead c (Bind +b0) u0) x1 x3))))).(pr3_t (THead (Bind Abbr) t0 x1) (THead (Flat Appl) t0 +(THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) +t)))) c (pr3_t (THead (Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Flat +Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S +O) O v) t)))) c (pr3_thin_dx c (THeads (Flat Appl) t1 (THead (Bind b) u +(THead (Flat Appl) (lift (S O) O v) t))) (THead (Bind Abst) x0 x1) (H0 c +(THead (Bind Abst) x0 x1) H7 (\lambda (H9: (iso (THeads (Flat Appl) t1 (THead +(Flat Appl) v (THead (Bind b) u t))) (THead (Bind Abst) x0 x1))).(\lambda (P: +Prop).(iso_flats_flat_bind_false Appl Appl Abst x0 v x1 (THead (Bind b) u t) +t1 H9 P)))) t0 Appl) (THead (Bind Abbr) t0 x1) (pr3_pr2 c (THead (Flat Appl) +t0 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) t0 x1) (pr2_free c (THead +(Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) t0 x1) (pr0_beta +x0 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl x1))))) u2 (pr3_t (THead (Bind Abbr) +x2 x3) (THead (Bind Abbr) t0 x1) c (pr3_head_12 c t0 x2 H6 (Bind Abbr) x1 x3 +(H8 Abbr x2)) u2 H5)))))))))) H4)) (\lambda (H4: (ex6_6 B T T T T T (\lambda +(b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) (THead +(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))))).(ex6_6_ind +B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u +t))) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind +b0) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))) (pr3 c +(THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat +Appl) (lift (S O) O v) t)))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda +(x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H5: (not +(eq B x0 Abst))).(\lambda (H6: (pr3 c (THeads (Flat Appl) t1 (THead (Flat +Appl) v (THead (Bind b) u t))) (THead (Bind x0) x1 x2))).(\lambda (H7: (pr3 c +(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda +(H8: (pr3 c t0 x4)).(\lambda (H9: (pr3 c x1 x5)).(\lambda (H10: (pr3 (CHead c +(Bind x0) x5) x2 x3)).(pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S +O) O x4) x2)) (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u +(THead (Flat Appl) (lift (S O) O v) t)))) c (pr3_t (THead (Bind x0) x1 (THead +(Flat Appl) (lift (S O) O t0) x2)) (THead (Flat Appl) t0 (THeads (Flat Appl) +t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) c (pr3_t +(THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Flat Appl) t0 (THeads +(Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) c +(pr3_thin_dx c (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) +(lift (S O) O v) t))) (THead (Bind x0) x1 x2) (H0 c (THead (Bind x0) x1 x2) +H6 (\lambda (H11: (iso (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead +(Bind b) u t))) (THead (Bind x0) x1 x2))).(\lambda (P: +Prop).(iso_flats_flat_bind_false Appl Appl x0 x1 v x2 (THead (Bind b) u t) t1 +H11 P)))) t0 Appl) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t0) +x2)) (pr3_pr2 c (THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Bind +x0) x1 (THead (Flat Appl) (lift (S O) O t0) x2)) (pr2_free c (THead (Flat +Appl) t0 (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) +(lift (S O) O t0) x2)) (pr0_upsilon x0 H5 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl +x1) x2 x2 (pr0_refl x2))))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S +O) O x4) x2)) (pr3_head_12 c x1 x1 (pr3_refl c x1) (Bind x0) (THead (Flat +Appl) (lift (S O) O t0) x2) (THead (Flat Appl) (lift (S O) O x4) x2) +(pr3_head_12 (CHead c (Bind x0) x1) (lift (S O) O t0) (lift (S O) O x4) +(pr3_lift (CHead c (Bind x0) x1) c (S O) O (drop_drop (Bind x0) O c c +(drop_refl c) x1) t0 x4 H8) (Flat Appl) x2 x2 (pr3_refl (CHead (CHead c (Bind +x0) x1) (Flat Appl) (lift (S O) O x4)) x2)))) u2 (pr3_t (THead (Bind x0) x5 +(THead (Flat Appl) (lift (S O) O x4) x3)) (THead (Bind x0) x1 (THead (Flat +Appl) (lift (S O) O x4) x2)) c (pr3_head_12 c x1 x5 H9 (Bind x0) (THead (Flat +Appl) (lift (S O) O x4) x2) (THead (Flat Appl) (lift (S O) O x4) x3) +(pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H10 (lift (S O) O x4) Appl)) u2 +H7)))))))))))))) H4)) H3))))))))) vs)))))). + +theorem pr3_iso_appls_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (vs: TList).(\forall (u: +T).(\forall (t: T).(let u1 \def (THeads (Flat Appl) vs (THead (Bind b) u t)) +in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to +(\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat Appl) +(lifts (S O) O vs) t)) u2)))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (vs: +TList).(tlist_ind_rew (\lambda (t: TList).(\forall (u: T).(\forall (t0: +T).(let u1 \def (THeads (Flat Appl) t (THead (Bind b) u t0)) in (\forall (c: +C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: +Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O t) +t0)) u2))))))))) (\lambda (u: T).(\lambda (t: T).(\lambda (c: C).(\lambda +(u2: T).(\lambda (H0: (pr3 c (THead (Bind b) u t) u2)).(\lambda (_: (((iso +(THead (Bind b) u t) u2) \to (\forall (P: Prop).P)))).H0)))))) (\lambda (ts: +TList).(\lambda (t: T).(\lambda (H0: ((\forall (u: T).(\forall (t0: +T).(\forall (c: C).(\forall (u2: T).((pr3 c (THeads (Flat Appl) ts (THead +(Bind b) u t0)) u2) \to ((((iso (THeads (Flat Appl) ts (THead (Bind b) u t0)) +u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat +Appl) (lifts (S O) O ts) t0)) u2))))))))).(\lambda (u: T).(\lambda (t0: +T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H1: (pr3 c (THeads (Flat Appl) +(TApp ts t) (THead (Bind b) u t0)) u2)).(\lambda (H2: (((iso (THeads (Flat +Appl) (TApp ts t) (THead (Bind b) u t0)) u2) \to (\forall (P: +Prop).P)))).(eq_ind_r TList (TApp (lifts (S O) O ts) (lift (S O) O t)) +(\lambda (t1: TList).(pr3 c (THead (Bind b) u (THeads (Flat Appl) t1 t0)) +u2)) (eq_ind_r T (THeads (Flat Appl) (lifts (S O) O ts) (THead (Flat Appl) +(lift (S O) O t) t0)) (\lambda (t1: T).(pr3 c (THead (Bind b) u t1) u2)) (let +H3 \def (eq_ind T (THeads (Flat Appl) (TApp ts t) (THead (Bind b) u t0)) +(\lambda (t1: T).(pr3 c t1 u2)) H1 (THeads (Flat Appl) ts (THead (Flat Appl) +t (THead (Bind b) u t0))) (theads_tapp (Flat Appl) ts t (THead (Bind b) u +t0))) in (let H4 \def (eq_ind T (THeads (Flat Appl) (TApp ts t) (THead (Bind +b) u t0)) (\lambda (t1: T).((iso t1 u2) \to (\forall (P: Prop).P))) H2 +(THeads (Flat Appl) ts (THead (Flat Appl) t (THead (Bind b) u t0))) +(theads_tapp (Flat Appl) ts t (THead (Bind b) u t0))) in (TList_ind (\lambda +(t1: TList).(((\forall (u0: T).(\forall (t2: T).(\forall (c0: C).(\forall +(u3: T).((pr3 c0 (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) u3) \to +((((iso (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) u3) \to (\forall (P: +Prop).P))) \to (pr3 c0 (THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O +t1) t2)) u3)))))))) \to ((pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) t +(THead (Bind b) u t0))) u2) \to ((((iso (THeads (Flat Appl) t1 (THead (Flat +Appl) t (THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P))) \to (pr3 c +(THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O t1) (THead (Flat Appl) +(lift (S O) O t) t0))) u2))))) (\lambda (_: ((\forall (u0: T).(\forall (t1: +T).(\forall (c0: C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) TNil (THead +(Bind b) u0 t1)) u3) \to ((((iso (THeads (Flat Appl) TNil (THead (Bind b) u0 +t1)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 (THead (Bind b) u0 (THeads +(Flat Appl) (lifts (S O) O TNil) t1)) u3))))))))).(\lambda (H6: (pr3 c +(THeads (Flat Appl) TNil (THead (Flat Appl) t (THead (Bind b) u t0))) +u2)).(\lambda (H7: (((iso (THeads (Flat Appl) TNil (THead (Flat Appl) t +(THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P)))).(pr3_iso_appl_bind b +H t u t0 c u2 H6 H7)))) (\lambda (t1: T).(\lambda (ts0: TList).(\lambda (_: +((((\forall (u0: T).(\forall (t2: T).(\forall (c0: C).(\forall (u3: T).((pr3 +c0 (THeads (Flat Appl) ts0 (THead (Bind b) u0 t2)) u3) \to ((((iso (THeads +(Flat Appl) ts0 (THead (Bind b) u0 t2)) u3) \to (\forall (P: Prop).P))) \to +(pr3 c0 (THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O ts0) t2)) +u3)))))))) \to ((pr3 c (THeads (Flat Appl) ts0 (THead (Flat Appl) t (THead +(Bind b) u t0))) u2) \to ((((iso (THeads (Flat Appl) ts0 (THead (Flat Appl) t +(THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead +(Bind b) u (THeads (Flat Appl) (lifts (S O) O ts0) (THead (Flat Appl) (lift +(S O) O t) t0))) u2)))))).(\lambda (H5: ((\forall (u0: T).(\forall (t2: +T).(\forall (c0: C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) (TCons t1 +ts0) (THead (Bind b) u0 t2)) u3) \to ((((iso (THeads (Flat Appl) (TCons t1 +ts0) (THead (Bind b) u0 t2)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 +(THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O (TCons t1 ts0)) t2)) +u3))))))))).(\lambda (H6: (pr3 c (THeads (Flat Appl) (TCons t1 ts0) (THead +(Flat Appl) t (THead (Bind b) u t0))) u2)).(\lambda (H7: (((iso (THeads (Flat +Appl) (TCons t1 ts0) (THead (Flat Appl) t (THead (Bind b) u t0))) u2) \to +(\forall (P: Prop).P)))).(H5 u (THead (Flat Appl) (lift (S O) O t) t0) c u2 +(pr3_iso_appls_appl_bind b H t u t0 (TCons t1 ts0) c u2 H6 H7) (\lambda (H8: +(iso (THeads (Flat Appl) (TCons t1 ts0) (THead (Bind b) u (THead (Flat Appl) +(lift (S O) O t) t0))) u2)).(\lambda (P: Prop).(H7 (iso_trans (THeads (Flat +Appl) (TCons t1 ts0) (THead (Flat Appl) t (THead (Bind b) u t0))) (THeads +(Flat Appl) (TCons t1 ts0) (THead (Bind b) u (THead (Flat Appl) (lift (S O) O +t) t0))) (iso_head t1 t1 (THeads (Flat Appl) ts0 (THead (Flat Appl) t (THead +(Bind b) u t0))) (THeads (Flat Appl) ts0 (THead (Bind b) u (THead (Flat Appl) +(lift (S O) O t) t0))) (Flat Appl)) u2 H8) P)))))))))) ts H0 H3 H4))) (THeads +(Flat Appl) (TApp (lifts (S O) O ts) (lift (S O) O t)) t0) (theads_tapp (Flat +Appl) (lifts (S O) O ts) (lift (S O) O t) t0)) (lifts (S O) O (TApp ts t)) +(lifts_tapp (S O) O t ts))))))))))) vs))). + +theorem pr3_iso_beta: + \forall (v: T).(\forall (w: T).(\forall (t: T).(let u1 \def (THead (Flat +Appl) v (THead (Bind Abst) w t)) in (\forall (c: C).(\forall (u2: T).((pr3 c +u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead (Bind +Abbr) v t) u2)))))))) +\def + \lambda (v: T).(\lambda (w: T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: +T).(\lambda (H: (pr3 c (THead (Flat Appl) v (THead (Bind Abst) w t)) +u2)).(\lambda (H0: (((iso (THead (Flat Appl) v (THead (Bind Abst) w t)) u2) +\to (\forall (P: Prop).P)))).(let H1 \def (pr3_gen_appl c v (THead (Bind +Abst) w t) u2 H) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq +T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v +u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THead (Bind Abst) w t) t2)))) +(ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: +T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))) (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) +w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind +b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) w t) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c v u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c +(THead (Bind Abbr) v t) u2) (\lambda (H2: (ex3_2 T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c +(THead (Bind Abst) w t) t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: +T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: +T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THead (Bind Abst) +w t) t2))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H3: (eq T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c v +x0)).(\lambda (_: (pr3 c (THead (Bind Abst) w t) x1)).(let H6 \def (eq_ind T +u2 (\lambda (t0: T).((iso (THead (Flat Appl) v (THead (Bind Abst) w t)) t0) +\to (\forall (P: Prop).P))) H0 (THead (Flat Appl) x0 x1) H3) in (eq_ind_r T +(THead (Flat Appl) x0 x1) (\lambda (t0: T).(pr3 c (THead (Bind Abbr) v t) +t0)) (H6 (iso_head v x0 (THead (Bind Abst) w t) x1 (Flat Appl)) (pr3 c (THead +(Bind Abbr) v t) (THead (Flat Appl) x0 x1))) u2 H3))))))) H2)) (\lambda (H2: +(ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: +T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))) (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) +w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind +b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v +u3))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c (THead (Bind Abst) w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall +(u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))) (pr3 c (THead (Bind Abbr) v t) +u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (H3: (pr3 c (THead (Bind Abbr) x2 x3) u2)).(\lambda (H4: (pr3 c v +x2)).(\lambda (H5: (pr3 c (THead (Bind Abst) w t) (THead (Bind Abst) x0 +x1))).(\lambda (H6: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) +u) x1 x3))))).(let H7 \def (pr3_gen_abst c w t (THead (Bind Abst) x0 x1) H5) +in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind Abst) +x0 x1) (THead (Bind Abst) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c w +u3))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) t t2))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda +(x4: T).(\lambda (x5: T).(\lambda (H8: (eq T (THead (Bind Abst) x0 x1) (THead +(Bind Abst) x4 x5))).(\lambda (H9: (pr3 c w x4)).(\lambda (H10: ((\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t x5))))).(let H11 \def (f_equal +T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) +\Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ t0 _) \Rightarrow t0])) +(THead (Bind Abst) x0 x1) (THead (Bind Abst) x4 x5) H8) in ((let H12 \def +(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with +[(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t0) +\Rightarrow t0])) (THead (Bind Abst) x0 x1) (THead (Bind Abst) x4 x5) H8) in +(\lambda (H13: (eq T x0 x4)).(let H14 \def (eq_ind_r T x5 (\lambda (t0: +T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t t0)))) H10 x1 +H12) in (let H15 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 c w t0)) H9 x0 +H13) in (pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) v t) c +(pr3_head_12 c v x2 H4 (Bind Abbr) t x3 (pr3_t x1 t (CHead c (Bind Abbr) x2) +(H14 Abbr x2) x3 (H6 Abbr x2))) u2 H3))))) H11))))))) H7)))))))))) H2)) +(\lambda (H2: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) w t) (THead (Bind b) y1 +z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: +T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat +Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v +u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THead (Bind Abst) w t) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda +(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) +u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2))))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda (x0: B).(\lambda +(x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: +T).(\lambda (H3: (not (eq B x0 Abst))).(\lambda (H4: (pr3 c (THead (Bind +Abst) w t) (THead (Bind x0) x1 x2))).(\lambda (H5: (pr3 c (THead (Bind x0) x5 +(THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (_: (pr3 c v +x4)).(\lambda (_: (pr3 c x1 x5)).(\lambda (H8: (pr3 (CHead c (Bind x0) x5) x2 +x3)).(let H9 \def (pr3_gen_abst c w t (THead (Bind x0) x1 x2) H4) in +(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c w +u3))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) t t2))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda +(x6: T).(\lambda (x7: T).(\lambda (H10: (eq T (THead (Bind x0) x1 x2) (THead +(Bind Abst) x6 x7))).(\lambda (H11: (pr3 c w x6)).(\lambda (H12: ((\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t x7))))).(let H13 \def +(f_equal T B (\lambda (e: T).(match e in T return (\lambda (_: T).B) with +[(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead k _ _) +\Rightarrow (match k in K return (\lambda (_: K).B) with [(Bind b) +\Rightarrow b | (Flat _) \Rightarrow x0])])) (THead (Bind x0) x1 x2) (THead +(Bind Abst) x6 x7) H10) in ((let H14 \def (f_equal T T (\lambda (e: T).(match +e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x1 | (TLRef _) +\Rightarrow x1 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind x0) x1 x2) +(THead (Bind Abst) x6 x7) H10) in ((let H15 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x2 | +(TLRef _) \Rightarrow x2 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind x0) +x1 x2) (THead (Bind Abst) x6 x7) H10) in (\lambda (H16: (eq T x1 +x6)).(\lambda (H17: (eq B x0 Abst)).(let H18 \def (eq_ind_r T x7 (\lambda +(t0: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t t0)))) +H12 x2 H15) in (let H19 \def (eq_ind_r T x6 (\lambda (t0: T).(pr3 c w t0)) +H11 x1 H16) in (let H20 \def (eq_ind B x0 (\lambda (b: B).(pr3 (CHead c (Bind +b) x5) x2 x3)) H8 Abst H17) in (let H21 \def (eq_ind B x0 (\lambda (b: +B).(pr3 c (THead (Bind b) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)) +H5 Abst H17) in (let H22 \def (eq_ind B x0 (\lambda (b: B).(not (eq B b +Abst))) H3 Abst H17) in (let H23 \def (match (H22 (refl_equal B Abst)) in +False return (\lambda (_: False).(pr3 c (THead (Bind Abbr) v t) u2)) with []) +in H23))))))))) H14)) H13))))))) H9)))))))))))))) H2)) H1)))))))). + +theorem pr3_iso_appls_beta: + \forall (us: TList).(\forall (v: T).(\forall (w: T).(\forall (t: T).(let u1 +\def (THeads (Flat Appl) us (THead (Flat Appl) v (THead (Bind Abst) w t))) in +(\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to +(\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) us (THead (Bind Abbr) +v t)) u2))))))))) +\def + \lambda (us: TList).(TList_ind (\lambda (t: TList).(\forall (v: T).(\forall +(w: T).(\forall (t0: T).(let u1 \def (THeads (Flat Appl) t (THead (Flat Appl) +v (THead (Bind Abst) w t0))) in (\forall (c: C).(\forall (u2: T).((pr3 c u1 +u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat +Appl) t (THead (Bind Abbr) v t0)) u2)))))))))) (\lambda (v: T).(\lambda (w: +T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H: (pr3 c +(THead (Flat Appl) v (THead (Bind Abst) w t)) u2)).(\lambda (H0: (((iso +(THead (Flat Appl) v (THead (Bind Abst) w t)) u2) \to (\forall (P: +Prop).P)))).(pr3_iso_beta v w t c u2 H H0)))))))) (\lambda (t: T).(\lambda +(t0: TList).(\lambda (H: ((\forall (v: T).(\forall (w: T).(\forall (t1: +T).(\forall (c: C).(\forall (u2: T).((pr3 c (THeads (Flat Appl) t0 (THead +(Flat Appl) v (THead (Bind Abst) w t1))) u2) \to ((((iso (THeads (Flat Appl) +t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) u2) \to (\forall (P: +Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1)) +u2)))))))))).(\lambda (v: T).(\lambda (w: T).(\lambda (t1: T).(\lambda (c: +C).(\lambda (u2: T).(\lambda (H0: (pr3 c (THead (Flat Appl) t (THeads (Flat +Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1)))) u2)).(\lambda (H1: +(((iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Flat Appl) v +(THead (Bind Abst) w t1)))) u2) \to (\forall (P: Prop).P)))).(let H2 \def +(pr3_gen_appl c t (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind +Abst) w t1))) u2 H0) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: +T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: +T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) +t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) t2)))) (ex4_4 T T T T +(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c +(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat +Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c +(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) u2) +(\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead +(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) +(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat +Appl) v (THead (Bind Abst) w t1))) t2))))).(ex3_2_ind T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c +(THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) t2))) +(pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) +u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T u2 (THead (Flat +Appl) x0 x1))).(\lambda (_: (pr3 c t x0)).(\lambda (_: (pr3 c (THeads (Flat +Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) x1)).(let H7 \def +(eq_ind T u2 (\lambda (t2: T).((iso (THead (Flat Appl) t (THeads (Flat Appl) +t0 (THead (Flat Appl) v (THead (Bind Abst) w t1)))) t2) \to (\forall (P: +Prop).P))) H1 (THead (Flat Appl) x0 x1) H4) in (eq_ind_r T (THead (Flat Appl) +x0 x1) (\lambda (t2: T).(pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 +(THead (Bind Abbr) v t1))) t2)) (H7 (iso_head t x0 (THeads (Flat Appl) t0 +(THead (Flat Appl) v (THead (Bind Abst) w t1))) x1 (Flat Appl)) (pr3 c (THead +(Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) (THead (Flat +Appl) x0 x1))) u2 H4))))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat +Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T +T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c +(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat +Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))) (pr3 c (THead (Flat +Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) u2) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (pr3 c +(THead (Bind Abbr) x2 x3) u2)).(\lambda (H5: (pr3 c t x2)).(\lambda (H6: (pr3 +c (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) +(THead (Bind Abst) x0 x1))).(\lambda (H7: ((\forall (b: B).(\forall (u: +T).(pr3 (CHead c (Bind b) u) x1 x3))))).(pr3_t (THead (Bind Abbr) t x1) +(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c +(pr3_t (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead (Flat Appl) t +(THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c (pr3_thin_dx c (THeads +(Flat Appl) t0 (THead (Bind Abbr) v t1)) (THead (Bind Abst) x0 x1) (H v w t1 +c (THead (Bind Abst) x0 x1) H6 (\lambda (H8: (iso (THeads (Flat Appl) t0 +(THead (Flat Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) x0 +x1))).(\lambda (P: Prop).(iso_flats_flat_bind_false Appl Appl Abst x0 v x1 +(THead (Bind Abst) w t1) t0 H8 P)))) t Appl) (THead (Bind Abbr) t x1) +(pr3_pr2 c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) +t x1) (pr2_free c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead +(Bind Abbr) t x1) (pr0_beta x0 t t (pr0_refl t) x1 x1 (pr0_refl x1))))) u2 +(pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) t x1) c (pr3_head_12 c t +x2 H5 (Bind Abbr) x1 x3 (H7 Abbr x2)) u2 H4)))))))))) H3)) (\lambda (H3: +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) +w t1))) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 +z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat +Appl) v (THead (Bind Abst) w t1))) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda +(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) +u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead +(Bind Abbr) v t1))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: +T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H4: (not (eq +B x0 Abst))).(\lambda (H5: (pr3 c (THeads (Flat Appl) t0 (THead (Flat Appl) v +(THead (Bind Abst) w t1))) (THead (Bind x0) x1 x2))).(\lambda (H6: (pr3 c +(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda +(H7: (pr3 c t x4)).(\lambda (H8: (pr3 c x1 x5)).(\lambda (H9: (pr3 (CHead c +(Bind x0) x5) x2 x3)).(pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S +O) O x4) x2)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) +v t1))) c (pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) +(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c +(pr3_t (THead (Flat Appl) t (THead (Bind x0) x1 x2)) (THead (Flat Appl) t +(THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c (pr3_thin_dx c (THeads +(Flat Appl) t0 (THead (Bind Abbr) v t1)) (THead (Bind x0) x1 x2) (H v w t1 c +(THead (Bind x0) x1 x2) H5 (\lambda (H10: (iso (THeads (Flat Appl) t0 (THead +(Flat Appl) v (THead (Bind Abst) w t1))) (THead (Bind x0) x1 x2))).(\lambda +(P: Prop).(iso_flats_flat_bind_false Appl Appl x0 x1 v x2 (THead (Bind Abst) +w t1) t0 H10 P)))) t Appl) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) +O t) x2)) (pr3_pr2 c (THead (Flat Appl) t (THead (Bind x0) x1 x2)) (THead +(Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr2_free c (THead +(Flat Appl) t (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) +(lift (S O) O t) x2)) (pr0_upsilon x0 H4 t t (pr0_refl t) x1 x1 (pr0_refl x1) +x2 x2 (pr0_refl x2))))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O +x4) x2)) (pr3_head_12 c x1 x1 (pr3_refl c x1) (Bind x0) (THead (Flat Appl) +(lift (S O) O t) x2) (THead (Flat Appl) (lift (S O) O x4) x2) (pr3_head_12 +(CHead c (Bind x0) x1) (lift (S O) O t) (lift (S O) O x4) (pr3_lift (CHead c +(Bind x0) x1) c (S O) O (drop_drop (Bind x0) O c c (drop_refl c) x1) t x4 H7) +(Flat Appl) x2 x2 (pr3_refl (CHead (CHead c (Bind x0) x1) (Flat Appl) (lift +(S O) O x4)) x2)))) u2 (pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S +O) O x4) x3)) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) c +(pr3_head_12 c x1 x5 H8 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) +(THead (Flat Appl) (lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) +x2 x3 H9 (lift (S O) O x4) Appl)) u2 H6)))))))))))))) H3)) H2)))))))))))) us). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/arity.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/arity.ma index 800e6a00e..e8c5f04ae 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/arity.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/arity.ma @@ -16,67 +16,286 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/arity". -include "ceqc/props.ma". +include "csubc/props.ma". + +theorem sc3_arity_csubc: + \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 +t a) \to (\forall (d1: C).(\forall (is: PList).((drop1 is d1 c1) \to (\forall +(c2: C).((csubc g d1 c2) \to (sc3 g a c2 (lift1 is t))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: +A).(\forall (d1: C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: +C).((csubc g d1 c2) \to (sc3 g a0 c2 (lift1 is t0)))))))))) (\lambda (c: +C).(\lambda (n: nat).(\lambda (d1: C).(\lambda (is: PList).(\lambda (_: +(drop1 is d1 c)).(\lambda (c2: C).(\lambda (_: (csubc g d1 c2)).(eq_ind_r T +(TSort n) (\lambda (t0: T).(land (arity g c2 t0 (ASort O n)) (sn3 c2 t0))) +(conj (arity g c2 (TSort n) (ASort O n)) (sn3 c2 (TSort n)) (arity_sort g c2 +n) (sn3_nf2 c2 (TSort n) (nf2_sort c2 n))) (lift1 is (TSort n)) (lift1_sort n +is))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: +nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: +A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall (d1: C).(\forall +(is: PList).((drop1 is d1 d) \to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g +a0 c2 (lift1 is u))))))))).(\lambda (d1: C).(\lambda (is: PList).(\lambda +(H3: (drop1 is d1 c)).(\lambda (c2: C).(\lambda (H4: (csubc g d1 c2)).(let +H_x \def (drop1_getl_trans is c d1 H3 Abbr d u i H0) in (let H5 \def H_x in +(ex2_ind C (\lambda (e2: C).(drop1 (ptrans is i) e2 d)) (\lambda (e2: +C).(getl (trans is i) d1 (CHead e2 (Bind Abbr) (lift1 (ptrans is i) u)))) +(sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x: C).(\lambda (_: (drop1 +(ptrans is i) x d)).(\lambda (H7: (getl (trans is i) d1 (CHead x (Bind Abbr) +(lift1 (ptrans is i) u)))).(let H_x0 \def (csubc_getl_conf g d1 (CHead x +(Bind Abbr) (lift1 (ptrans is i) u)) (trans is i) H7 c2 H4) in (let H8 \def +H_x0 in (ex2_ind C (\lambda (e2: C).(getl (trans is i) c2 e2)) (\lambda (e2: +C).(csubc g (CHead x (Bind Abbr) (lift1 (ptrans is i) u)) e2)) (sc3 g a0 c2 +(lift1 is (TLRef i))) (\lambda (x0: C).(\lambda (H9: (getl (trans is i) c2 +x0)).(\lambda (H10: (csubc g (CHead x (Bind Abbr) (lift1 (ptrans is i) u)) +x0)).(let H11 \def (match H10 in csubc return (\lambda (c0: C).(\lambda (c3: +C).(\lambda (_: (csubc ? c0 c3)).((eq C c0 (CHead x (Bind Abbr) (lift1 +(ptrans is i) u))) \to ((eq C c3 x0) \to (sc3 g a0 c2 (lift1 is (TLRef +i)))))))) with [(csubc_sort n) \Rightarrow (\lambda (H11: (eq C (CSort n) +(CHead x (Bind Abbr) (lift1 (ptrans is i) u)))).(\lambda (H12: (eq C (CSort +n) x0)).((let H13 \def (eq_ind C (CSort n) (\lambda (e: C).(match e in C +return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) +\Rightarrow False])) I (CHead x (Bind Abbr) (lift1 (ptrans is i) u)) H11) in +(False_ind ((eq C (CSort n) x0) \to (sc3 g a0 c2 (lift1 is (TLRef i)))) H13)) +H12))) | (csubc_head c0 c3 H11 k v) \Rightarrow (\lambda (H12: (eq C (CHead +c0 k v) (CHead x (Bind Abbr) (lift1 (ptrans is i) u)))).(\lambda (H13: (eq C +(CHead c3 k v) x0)).((let H14 \def (f_equal C T (\lambda (e: C).(match e in C +return (\lambda (_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t0) +\Rightarrow t0])) (CHead c0 k v) (CHead x (Bind Abbr) (lift1 (ptrans is i) +u)) H12) in ((let H15 \def (f_equal C K (\lambda (e: C).(match e in C return +(\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow +k0])) (CHead c0 k v) (CHead x (Bind Abbr) (lift1 (ptrans is i) u)) H12) in +((let H16 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: +C).C) with [(CSort _) \Rightarrow c0 | (CHead c4 _ _) \Rightarrow c4])) +(CHead c0 k v) (CHead x (Bind Abbr) (lift1 (ptrans is i) u)) H12) in (eq_ind +C x (\lambda (c4: C).((eq K k (Bind Abbr)) \to ((eq T v (lift1 (ptrans is i) +u)) \to ((eq C (CHead c3 k v) x0) \to ((csubc g c4 c3) \to (sc3 g a0 c2 +(lift1 is (TLRef i)))))))) (\lambda (H17: (eq K k (Bind Abbr))).(eq_ind K +(Bind Abbr) (\lambda (k0: K).((eq T v (lift1 (ptrans is i) u)) \to ((eq C +(CHead c3 k0 v) x0) \to ((csubc g x c3) \to (sc3 g a0 c2 (lift1 is (TLRef +i))))))) (\lambda (H18: (eq T v (lift1 (ptrans is i) u))).(eq_ind T (lift1 +(ptrans is i) u) (\lambda (t0: T).((eq C (CHead c3 (Bind Abbr) t0) x0) \to +((csubc g x c3) \to (sc3 g a0 c2 (lift1 is (TLRef i)))))) (\lambda (H19: (eq +C (CHead c3 (Bind Abbr) (lift1 (ptrans is i) u)) x0)).(eq_ind C (CHead c3 +(Bind Abbr) (lift1 (ptrans is i) u)) (\lambda (_: C).((csubc g x c3) \to (sc3 +g a0 c2 (lift1 is (TLRef i))))) (\lambda (_: (csubc g x c3)).(let H21 \def +(eq_ind_r C x0 (\lambda (c4: C).(getl (trans is i) c2 c4)) H9 (CHead c3 (Bind +Abbr) (lift1 (ptrans is i) u)) H19) in (let H_y \def (sc3_abbr g a0 TNil) in +(eq_ind_r T (TLRef (trans is i)) (\lambda (t0: T).(sc3 g a0 c2 t0)) (H_y +(trans is i) c3 (lift1 (ptrans is i) u) c2 (eq_ind T (lift1 is (lift (S i) O +u)) (\lambda (t0: T).(sc3 g a0 c2 t0)) (eq_ind T (lift1 (PConsTail is (S i) +O) u) (\lambda (t0: T).(sc3 g a0 c2 t0)) (H2 d1 (PConsTail is (S i) O) +(drop1_cons_tail c d (S i) O (getl_drop Abbr c d u i H0) is d1 H3) c2 H4) +(lift1 is (lift (S i) O u)) (lift1_cons_tail u (S i) O is)) (lift (S (trans +is i)) O (lift1 (ptrans is i) u)) (lift1_free is i u)) H21) (lift1 is (TLRef +i)) (lift1_lref is i))))) x0 H19)) v (sym_eq T v (lift1 (ptrans is i) u) +H18))) k (sym_eq K k (Bind Abbr) H17))) c0 (sym_eq C c0 x H16))) H15)) H14)) +H13 H11))) | (csubc_abst c0 c3 H11 v a1 H12 w H13) \Rightarrow (\lambda (H14: +(eq C (CHead c0 (Bind Abst) v) (CHead x (Bind Abbr) (lift1 (ptrans is i) +u)))).(\lambda (H15: (eq C (CHead c3 (Bind Abbr) w) x0)).((let H16 \def +(eq_ind C (CHead c0 (Bind Abst) v) (\lambda (e: C).(match e in C return +(\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) +\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind b) +\Rightarrow (match b in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow +False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) +\Rightarrow False])])) I (CHead x (Bind Abbr) (lift1 (ptrans is i) u)) H14) +in (False_ind ((eq C (CHead c3 (Bind Abbr) w) x0) \to ((csubc g c0 c3) \to +((sc3 g (asucc g a1) c0 v) \to ((sc3 g a1 c3 w) \to (sc3 g a0 c2 (lift1 is +(TLRef i))))))) H16)) H15 H11 H12 H13)))]) in (H11 (refl_equal C (CHead x +(Bind Abbr) (lift1 (ptrans is i) u))) (refl_equal C x0)))))) H8)))))) +H5)))))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda +(i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) u))).(\lambda (a0: +A).(\lambda (H1: (arity g d u (asucc g a0))).(\lambda (_: ((\forall (d1: +C).(\forall (is: PList).((drop1 is d1 d) \to (\forall (c2: C).((csubc g d1 +c2) \to (sc3 g (asucc g a0) c2 (lift1 is u))))))))).(\lambda (d1: C).(\lambda +(is: PList).(\lambda (H3: (drop1 is d1 c)).(\lambda (c2: C).(\lambda (H4: +(csubc g d1 c2)).(let H5 \def H0 in (let H_x \def (drop1_getl_trans is c d1 +H3 Abst d u i H5) in (let H6 \def H_x in (ex2_ind C (\lambda (e2: C).(drop1 +(ptrans is i) e2 d)) (\lambda (e2: C).(getl (trans is i) d1 (CHead e2 (Bind +Abst) (lift1 (ptrans is i) u)))) (sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda +(x: C).(\lambda (H7: (drop1 (ptrans is i) x d)).(\lambda (H8: (getl (trans is +i) d1 (CHead x (Bind Abst) (lift1 (ptrans is i) u)))).(let H_x0 \def +(csubc_getl_conf g d1 (CHead x (Bind Abst) (lift1 (ptrans is i) u)) (trans is +i) H8 c2 H4) in (let H9 \def H_x0 in (ex2_ind C (\lambda (e2: C).(getl (trans +is i) c2 e2)) (\lambda (e2: C).(csubc g (CHead x (Bind Abst) (lift1 (ptrans +is i) u)) e2)) (sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x0: C).(\lambda +(H10: (getl (trans is i) c2 x0)).(\lambda (H11: (csubc g (CHead x (Bind Abst) +(lift1 (ptrans is i) u)) x0)).(let H12 \def (match H11 in csubc return +(\lambda (c0: C).(\lambda (c3: C).(\lambda (_: (csubc ? c0 c3)).((eq C c0 +(CHead x (Bind Abst) (lift1 (ptrans is i) u))) \to ((eq C c3 x0) \to (sc3 g +a0 c2 (lift1 is (TLRef i)))))))) with [(csubc_sort n) \Rightarrow (\lambda +(H12: (eq C (CSort n) (CHead x (Bind Abst) (lift1 (ptrans is i) +u)))).(\lambda (H13: (eq C (CSort n) x0)).((let H14 \def (eq_ind C (CSort n) +(\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) +\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead x (Bind Abst) +(lift1 (ptrans is i) u)) H12) in (False_ind ((eq C (CSort n) x0) \to (sc3 g +a0 c2 (lift1 is (TLRef i)))) H14)) H13))) | (csubc_head c0 c3 H12 k v) +\Rightarrow (\lambda (H13: (eq C (CHead c0 k v) (CHead x (Bind Abst) (lift1 +(ptrans is i) u)))).(\lambda (H14: (eq C (CHead c3 k v) x0)).((let H15 \def +(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with +[(CSort _) \Rightarrow v | (CHead _ _ t0) \Rightarrow t0])) (CHead c0 k v) +(CHead x (Bind Abst) (lift1 (ptrans is i) u)) H13) in ((let H16 \def (f_equal +C K (\lambda (e: C).(match e in C return (\lambda (_: C).K) with [(CSort _) +\Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c0 k v) (CHead x +(Bind Abst) (lift1 (ptrans is i) u)) H13) in ((let H17 \def (f_equal C C +(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow c0 | (CHead c4 _ _) \Rightarrow c4])) (CHead c0 k v) (CHead x +(Bind Abst) (lift1 (ptrans is i) u)) H13) in (eq_ind C x (\lambda (c4: +C).((eq K k (Bind Abst)) \to ((eq T v (lift1 (ptrans is i) u)) \to ((eq C +(CHead c3 k v) x0) \to ((csubc g c4 c3) \to (sc3 g a0 c2 (lift1 is (TLRef +i)))))))) (\lambda (H18: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) (\lambda +(k0: K).((eq T v (lift1 (ptrans is i) u)) \to ((eq C (CHead c3 k0 v) x0) \to +((csubc g x c3) \to (sc3 g a0 c2 (lift1 is (TLRef i))))))) (\lambda (H19: (eq +T v (lift1 (ptrans is i) u))).(eq_ind T (lift1 (ptrans is i) u) (\lambda (t0: +T).((eq C (CHead c3 (Bind Abst) t0) x0) \to ((csubc g x c3) \to (sc3 g a0 c2 +(lift1 is (TLRef i)))))) (\lambda (H20: (eq C (CHead c3 (Bind Abst) (lift1 +(ptrans is i) u)) x0)).(eq_ind C (CHead c3 (Bind Abst) (lift1 (ptrans is i) +u)) (\lambda (_: C).((csubc g x c3) \to (sc3 g a0 c2 (lift1 is (TLRef i))))) +(\lambda (_: (csubc g x c3)).(let H22 \def (eq_ind_r C x0 (\lambda (c4: +C).(getl (trans is i) c2 c4)) H10 (CHead c3 (Bind Abst) (lift1 (ptrans is i) +u)) H20) in (let H_y \def (sc3_abst g a0 TNil) in (eq_ind_r T (TLRef (trans +is i)) (\lambda (t0: T).(sc3 g a0 c2 t0)) (H_y c2 (trans is i) +(csubc_arity_conf g d1 c2 H4 (TLRef (trans is i)) a0 (eq_ind T (lift1 is +(TLRef i)) (\lambda (t0: T).(arity g d1 t0 a0)) (arity_lift1 g a0 c is d1 +(TLRef i) H3 (arity_abst g c d u i H0 a0 H1)) (TLRef (trans is i)) +(lift1_lref is i))) (nf2_lref_abst c2 c3 (lift1 (ptrans is i) u) (trans is i) +H22) I) (lift1 is (TLRef i)) (lift1_lref is i))))) x0 H20)) v (sym_eq T v +(lift1 (ptrans is i) u) H19))) k (sym_eq K k (Bind Abst) H18))) c0 (sym_eq C +c0 x H17))) H16)) H15)) H14 H12))) | (csubc_abst c0 c3 H12 v a1 H13 w H14) +\Rightarrow (\lambda (H15: (eq C (CHead c0 (Bind Abst) v) (CHead x (Bind +Abst) (lift1 (ptrans is i) u)))).(\lambda (H16: (eq C (CHead c3 (Bind Abbr) +w) x0)).((let H17 \def (f_equal C T (\lambda (e: C).(match e in C return +(\lambda (_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t0) \Rightarrow +t0])) (CHead c0 (Bind Abst) v) (CHead x (Bind Abst) (lift1 (ptrans is i) u)) +H15) in ((let H18 \def (f_equal C C (\lambda (e: C).(match e in C return +(\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c4 _ _) +\Rightarrow c4])) (CHead c0 (Bind Abst) v) (CHead x (Bind Abst) (lift1 +(ptrans is i) u)) H15) in (eq_ind C x (\lambda (c4: C).((eq T v (lift1 +(ptrans is i) u)) \to ((eq C (CHead c3 (Bind Abbr) w) x0) \to ((csubc g c4 +c3) \to ((sc3 g (asucc g a1) c4 v) \to ((sc3 g a1 c3 w) \to (sc3 g a0 c2 +(lift1 is (TLRef i))))))))) (\lambda (H19: (eq T v (lift1 (ptrans is i) +u))).(eq_ind T (lift1 (ptrans is i) u) (\lambda (t0: T).((eq C (CHead c3 +(Bind Abbr) w) x0) \to ((csubc g x c3) \to ((sc3 g (asucc g a1) x t0) \to +((sc3 g a1 c3 w) \to (sc3 g a0 c2 (lift1 is (TLRef i)))))))) (\lambda (H20: +(eq C (CHead c3 (Bind Abbr) w) x0)).(eq_ind C (CHead c3 (Bind Abbr) w) +(\lambda (_: C).((csubc g x c3) \to ((sc3 g (asucc g a1) x (lift1 (ptrans is +i) u)) \to ((sc3 g a1 c3 w) \to (sc3 g a0 c2 (lift1 is (TLRef i))))))) +(\lambda (_: (csubc g x c3)).(\lambda (H22: (sc3 g (asucc g a1) x (lift1 +(ptrans is i) u))).(\lambda (H23: (sc3 g a1 c3 w)).(let H24 \def (eq_ind_r C +x0 (\lambda (c4: C).(getl (trans is i) c2 c4)) H10 (CHead c3 (Bind Abbr) w) +H20) in (let H_y \def (sc3_abbr g a0 TNil) in (eq_ind_r T (TLRef (trans is +i)) (\lambda (t0: T).(sc3 g a0 c2 t0)) (H_y (trans is i) c3 w c2 (let H_y0 +\def (arity_lift1 g (asucc g a0) d (ptrans is i) x u H7 H1) in (let H_y1 \def +(sc3_arity_gen g x (lift1 (ptrans is i) u) (asucc g a1) H22) in (sc3_repl g +a1 c2 (lift (S (trans is i)) O w) (sc3_lift g a1 c3 w H23 c2 (S (trans is i)) +O (getl_drop Abbr c2 c3 w (trans is i) H24)) a0 (asucc_inj g a1 a0 +(arity_mono g x (lift1 (ptrans is i) u) (asucc g a1) H_y1 (asucc g a0) +H_y0))))) H24) (lift1 is (TLRef i)) (lift1_lref is i))))))) x0 H20)) v +(sym_eq T v (lift1 (ptrans is i) u) H19))) c0 (sym_eq C c0 x H18))) H17)) H16 +H12 H13 H14)))]) in (H12 (refl_equal C (CHead x (Bind Abst) (lift1 (ptrans is +i) u))) (refl_equal C x0)))))) H9)))))) H6))))))))))))))))) (\lambda (b: +B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c: C).(\lambda (u: +T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H2: ((\forall +(d1: C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: C).((csubc g +d1 c2) \to (sc3 g a1 c2 (lift1 is u))))))))).(\lambda (t0: T).(\lambda (a2: +A).(\lambda (_: (arity g (CHead c (Bind b) u) t0 a2)).(\lambda (H4: ((\forall +(d1: C).(\forall (is: PList).((drop1 is d1 (CHead c (Bind b) u)) \to (\forall +(c2: C).((csubc g d1 c2) \to (sc3 g a2 c2 (lift1 is t0))))))))).(\lambda (d1: +C).(\lambda (is: PList).(\lambda (H5: (drop1 is d1 c)).(\lambda (c2: +C).(\lambda (H6: (csubc g d1 c2)).(let H_y \def (sc3_bind g b H0 a1 a2 TNil) +in (eq_ind_r T (THead (Bind b) (lift1 is u) (lift1 (Ss is) t0)) (\lambda (t1: +T).(sc3 g a2 c2 t1)) (H_y c2 (lift1 is u) (lift1 (Ss is) t0) (H4 (CHead d1 +(Bind b) (lift1 is u)) (Ss is) (drop1_skip_bind b c is d1 u H5) (CHead c2 +(Bind b) (lift1 is u)) (csubc_head g d1 c2 H6 (Bind b) (lift1 is u))) (H2 d1 +is H5 c2 H6)) (lift1 is (THead (Bind b) u t0)) (lift1_bind b is u +t0))))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: +A).(\lambda (H0: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (d1: +C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: C).((csubc g d1 +c2) \to (sc3 g (asucc g a1) c2 (lift1 is u))))))))).(\lambda (t0: T).(\lambda +(a2: A).(\lambda (H2: (arity g (CHead c (Bind Abst) u) t0 a2)).(\lambda (H3: +((\forall (d1: C).(\forall (is: PList).((drop1 is d1 (CHead c (Bind Abst) u)) +\to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g a2 c2 (lift1 is +t0))))))))).(\lambda (d1: C).(\lambda (is: PList).(\lambda (H4: (drop1 is d1 +c)).(\lambda (c2: C).(\lambda (H5: (csubc g d1 c2)).(eq_ind_r T (THead (Bind +Abst) (lift1 is u) (lift1 (Ss is) t0)) (\lambda (t1: T).(land (arity g c2 t1 +(AHead a1 a2)) (\forall (d: C).(\forall (w: T).((sc3 g a1 d w) \to (\forall +(is0: PList).((drop1 is0 d c2) \to (sc3 g a2 d (THead (Flat Appl) w (lift1 +is0 t1)))))))))) (conj (arity g c2 (THead (Bind Abst) (lift1 is u) (lift1 (Ss +is) t0)) (AHead a1 a2)) (\forall (d: C).(\forall (w: T).((sc3 g a1 d w) \to +(\forall (is0: PList).((drop1 is0 d c2) \to (sc3 g a2 d (THead (Flat Appl) w +(lift1 is0 (THead (Bind Abst) (lift1 is u) (lift1 (Ss is) t0)))))))))) +(csubc_arity_conf g d1 c2 H5 (THead (Bind Abst) (lift1 is u) (lift1 (Ss is) +t0)) (AHead a1 a2) (arity_head g d1 (lift1 is u) a1 (arity_lift1 g (asucc g +a1) c is d1 u H4 H0) (lift1 (Ss is) t0) a2 (arity_lift1 g a2 (CHead c (Bind +Abst) u) (Ss is) (CHead d1 (Bind Abst) (lift1 is u)) t0 (drop1_skip_bind Abst +c is d1 u H4) H2))) (\lambda (d: C).(\lambda (w: T).(\lambda (H6: (sc3 g a1 d +w)).(\lambda (is0: PList).(\lambda (H7: (drop1 is0 d c2)).(eq_ind_r T (THead +(Bind Abst) (lift1 is0 (lift1 is u)) (lift1 (Ss is0) (lift1 (Ss is) t0))) +(\lambda (t1: T).(sc3 g a2 d (THead (Flat Appl) w t1))) (let H8 \def +(sc3_appl g a1 a2 TNil) in (H8 d w (lift1 (Ss is0) (lift1 (Ss is) t0)) (let +H_y \def (sc3_bind g Abbr (\lambda (H9: (eq B Abbr Abst)).(not_abbr_abst H9)) +a1 a2 TNil) in (H_y d w (lift1 (Ss is0) (lift1 (Ss is) t0)) (let H_x \def +(csubc_drop1_conf_rev g is0 d c2 H7 d1 H5) in (let H9 \def H_x in (ex2_ind C +(\lambda (c3: C).(drop1 is0 c3 d1)) (\lambda (c3: C).(csubc g c3 d)) (sc3 g +a2 (CHead d (Bind Abbr) w) (lift1 (Ss is0) (lift1 (Ss is) t0))) (\lambda (x: +C).(\lambda (H10: (drop1 is0 x d1)).(\lambda (H11: (csubc g x d)).(eq_ind_r T +(lift1 (papp (Ss is0) (Ss is)) t0) (\lambda (t1: T).(sc3 g a2 (CHead d (Bind +Abbr) w) t1)) (eq_ind_r PList (Ss (papp is0 is)) (\lambda (p: PList).(sc3 g +a2 (CHead d (Bind Abbr) w) (lift1 p t0))) (H3 (CHead x (Bind Abst) (lift1 +(papp is0 is) u)) (Ss (papp is0 is)) (drop1_skip_bind Abst c (papp is0 is) x +u (drop1_trans is0 x d1 H10 is c H4)) (CHead d (Bind Abbr) w) (csubc_abst g x +d H11 (lift1 (papp is0 is) u) a1 (H1 x (papp is0 is) (drop1_trans is0 x d1 +H10 is c H4) x (csubc_refl g x)) w H6)) (papp (Ss is0) (Ss is)) (papp_ss is0 +is)) (lift1 (Ss is0) (lift1 (Ss is) t0)) (lift1_lift1 (Ss is0) (Ss is) +t0))))) H9))) H6)) H6 (lift1 is0 (lift1 is u)) (sc3_lift1 g c2 (asucc g a1) +is0 d (lift1 is u) (H1 d1 is H4 c2 H5) H7))) (lift1 is0 (THead (Bind Abst) +(lift1 is u) (lift1 (Ss is) t0))) (lift1_bind Abst is0 (lift1 is u) (lift1 +(Ss is) t0))))))))) (lift1 is (THead (Bind Abst) u t0)) (lift1_bind Abst is u +t0)))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda +(_: (arity g c u a1)).(\lambda (H1: ((\forall (d1: C).(\forall (is: +PList).((drop1 is d1 c) \to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g a1 +c2 (lift1 is u))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity +g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (d1: C).(\forall (is: +PList).((drop1 is d1 c) \to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g +(AHead a1 a2) c2 (lift1 is t0))))))))).(\lambda (d1: C).(\lambda (is: +PList).(\lambda (H4: (drop1 is d1 c)).(\lambda (c2: C).(\lambda (H5: (csubc g +d1 c2)).(let H_y \def (H1 d1 is H4 c2 H5) in (let H_y0 \def (H3 d1 is H4 c2 +H5) in (let H6 \def H_y0 in (and_ind (arity g c2 (lift1 is t0) (AHead a1 a2)) +(\forall (d: C).(\forall (w: T).((sc3 g a1 d w) \to (\forall (is0: +PList).((drop1 is0 d c2) \to (sc3 g a2 d (THead (Flat Appl) w (lift1 is0 +(lift1 is t0))))))))) (sc3 g a2 c2 (lift1 is (THead (Flat Appl) u t0))) +(\lambda (_: (arity g c2 (lift1 is t0) (AHead a1 a2))).(\lambda (H8: +((\forall (d: C).(\forall (w: T).((sc3 g a1 d w) \to (\forall (is0: +PList).((drop1 is0 d c2) \to (sc3 g a2 d (THead (Flat Appl) w (lift1 is0 +(lift1 is t0))))))))))).(let H_y1 \def (H8 c2 (lift1 is u) H_y PNil) in +(eq_ind_r T (THead (Flat Appl) (lift1 is u) (lift1 is t0)) (\lambda (t1: +T).(sc3 g a2 c2 t1)) (H_y1 (drop1_nil c2)) (lift1 is (THead (Flat Appl) u +t0)) (lift1_flat Appl is u t0))))) H6)))))))))))))))))) (\lambda (c: +C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g +a0))).(\lambda (H1: ((\forall (d1: C).(\forall (is: PList).((drop1 is d1 c) +\to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g (asucc g a0) c2 (lift1 is +u))))))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda (H3: +((\forall (d1: C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: +C).((csubc g d1 c2) \to (sc3 g a0 c2 (lift1 is t0))))))))).(\lambda (d1: +C).(\lambda (is: PList).(\lambda (H4: (drop1 is d1 c)).(\lambda (c2: +C).(\lambda (H5: (csubc g d1 c2)).(let H_y \def (sc3_cast g a0 TNil) in +(eq_ind_r T (THead (Flat Cast) (lift1 is u) (lift1 is t0)) (\lambda (t1: +T).(sc3 g a0 c2 t1)) (H_y c2 (lift1 is u) (H1 d1 is H4 c2 H5) (lift1 is t0) +(H3 d1 is H4 c2 H5)) (lift1 is (THead (Flat Cast) u t0)) (lift1_flat Cast is +u t0)))))))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: +A).(\lambda (_: (arity g c t0 a1)).(\lambda (H1: ((\forall (d1: C).(\forall +(is: PList).((drop1 is d1 c) \to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g +a1 c2 (lift1 is t0))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 +a2)).(\lambda (d1: C).(\lambda (is: PList).(\lambda (H3: (drop1 is d1 +c)).(\lambda (c2: C).(\lambda (H4: (csubc g d1 c2)).(sc3_repl g a1 c2 (lift1 +is t0) (H1 d1 is H3 c2 H4) a2 H2))))))))))))) c1 t a H))))). theorem sc3_arity: \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t a) \to (sc3 g a c t))))) \def \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: -(arity g c t a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a0: -A).(sc3 g a0 c0 t0)))) (\lambda (c0: C).(\lambda (n: nat).(conj (arity g c0 -(TSort n) (ASort O n)) (sn3 c0 (TSort n)) (arity_sort g c0 n) (sn3_nf2 c0 -(TSort n) (nf2_sort c0 n))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) -u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (H2: (sc3 g a0 -d u)).(let H_y \def (sc3_abbr g a0 TNil) in (H_y i d u c0 (sc3_lift g a0 d u -H2 c0 (S i) O (getl_drop Abbr c0 d u i H0)) H0)))))))))) (\lambda (c0: -C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 -(CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u (asucc -g a0))).(\lambda (_: (sc3 g (asucc g a0) d u)).(let H3 \def (sc3_abst g a0 -TNil) in (H3 c0 i (arity_abst g c0 d u i H0 a0 H1) (nf2_lref_abst c0 d u i -H0) I)))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda -(c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u -a1)).(\lambda (H2: (sc3 g a1 c0 u)).(\lambda (t0: T).(\lambda (a2: -A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t0 a2)).(\lambda (H4: (sc3 g -a2 (CHead c0 (Bind b) u) t0)).(let H_y \def (sc3_bind g b H0 a1 a2 TNil) in -(H_y c0 u t0 H4 H2))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda -(a1: A).(\lambda (H0: (arity g c0 u (asucc g a1))).(\lambda (H1: (sc3 g -(asucc g a1) c0 u)).(\lambda (t0: T).(\lambda (a2: A).(\lambda (H2: (arity g -(CHead c0 (Bind Abst) u) t0 a2)).(\lambda (H3: (sc3 g a2 (CHead c0 (Bind -Abst) u) t0)).(conj (arity g c0 (THead (Bind Abst) u t0) (AHead a1 a2)) -(\forall (d: C).(\forall (w: T).((sc3 g a1 d w) \to (\forall (is: -PList).((drop1 is d c0) \to (sc3 g a2 d (THead (Flat Appl) w (lift1 is (THead -(Bind Abst) u t0))))))))) (arity_head g c0 u a1 H0 t0 a2 H2) (\lambda (d: -C).(\lambda (w: T).(\lambda (H4: (sc3 g a1 d w)).(\lambda (is: -PList).(\lambda (H5: (drop1 is d c0)).(let H6 \def (sc3_appl g a1 a2 TNil) in -(eq_ind_r T (THead (Bind Abst) (lift1 is u) (lift1 (Ss is) t0)) (\lambda (t1: -T).(sc3 g a2 d (THead (Flat Appl) w t1))) (H6 d w (lift1 (Ss is) t0) (let H_y -\def (sc3_bind g Abbr (\lambda (H7: (eq B Abbr Abst)).(not_abbr_abst H7)) a1 -a2 TNil) in (H_y d w (lift1 (Ss is) t0) (let H7 \def (sc3_ceqc_trans g a2 -TNil) in (H7 (CHead d (Bind Abst) (lift1 is u)) (lift1 (Ss is) t0) (sc3_lift1 -g (CHead c0 (Bind Abst) u) a2 (Ss is) (CHead d (Bind Abst) (lift1 is u)) t0 -H3 (drop1_skip_bind Abst c0 is d u H5)) (CHead d (Bind Abbr) w) (or_intror -(csubc g (CHead d (Bind Abbr) w) (CHead d (Bind Abst) (lift1 is u))) (csubc g -(CHead d (Bind Abst) (lift1 is u)) (CHead d (Bind Abbr) w)) (csubc_abst g d d -(csubc_refl g d) (lift1 is u) a1 (sc3_lift1 g c0 (asucc g a1) is d u H1 H5) w -H4)))) H4)) H4 (lift1 is u) (sc3_lift1 g c0 (asucc g a1) is d u H1 H5)) -(lift1 is (THead (Bind Abst) u t0)) (lift1_bind Abst is u -t0)))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: -A).(\lambda (_: (arity g c0 u a1)).(\lambda (H1: (sc3 g a1 c0 u)).(\lambda -(t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda -(H3: (sc3 g (AHead a1 a2) c0 t0)).(let H4 \def H3 in (and_ind (arity g c0 t0 -(AHead a1 a2)) (\forall (d: C).(\forall (w: T).((sc3 g a1 d w) \to (\forall -(is: PList).((drop1 is d c0) \to (sc3 g a2 d (THead (Flat Appl) w (lift1 is -t0)))))))) (sc3 g a2 c0 (THead (Flat Appl) u t0)) (\lambda (_: (arity g c0 t0 -(AHead a1 a2))).(\lambda (H6: ((\forall (d: C).(\forall (w: T).((sc3 g a1 d -w) \to (\forall (is: PList).((drop1 is d c0) \to (sc3 g a2 d (THead (Flat -Appl) w (lift1 is t0)))))))))).(let H_y \def (H6 c0 u H1 PNil) in (H_y -(drop1_nil c0))))) H4))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda -(a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda (H1: (sc3 g (asucc -g a0) c0 u)).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (H3: -(sc3 g a0 c0 t0)).(let H_y \def (sc3_cast g a0 TNil) in (H_y c0 u H1 t0 -H3)))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: -(arity g c0 t0 a1)).(\lambda (H1: (sc3 g a1 c0 t0)).(\lambda (a2: A).(\lambda -(H2: (leq g a1 a2)).(sc3_repl g a1 c0 t0 H1 a2 H2)))))))) c t a H))))). +(arity g c t a)).(let H_y \def (sc3_arity_csubc g c t a H c PNil) in (H_y +(drop1_nil c) c (csubc_refl g c))))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/props.ma index 3965938ed..aa28b068b 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/props.ma @@ -223,12 +223,77 @@ c2 (lift1 p t) (H c2 t H0 H15) c n n0 H14))) c3 (sym_eq C c3 e H13))) c1 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C e))))))))))) hds)))). -axiom sc3_abbr: +theorem sc3_abbr: \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (i: nat).(\forall (d: C).(\forall (v: T).(\forall (c: C).((sc3 g a c (THeads (Flat Appl) vs (lift (S i) O v))) \to ((getl i c (CHead d (Bind Abbr) v)) \to (sc3 g a c (THeads (Flat Appl) vs (TLRef i))))))))))) -. +\def + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (vs: +TList).(\forall (i: nat).(\forall (d: C).(\forall (v: T).(\forall (c: +C).((sc3 g a0 c (THeads (Flat Appl) vs (lift (S i) O v))) \to ((getl i c +(CHead d (Bind Abbr) v)) \to (sc3 g a0 c (THeads (Flat Appl) vs (TLRef +i))))))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (vs: +TList).(\lambda (i: nat).(\lambda (d: C).(\lambda (v: T).(\lambda (c: +C).(\lambda (H: (land (arity g c (THeads (Flat Appl) vs (lift (S i) O v)) +(ASort n n0)) (sn3 c (THeads (Flat Appl) vs (lift (S i) O v))))).(\lambda +(H0: (getl i c (CHead d (Bind Abbr) v))).(let H1 \def H in (and_ind (arity g +c (THeads (Flat Appl) vs (lift (S i) O v)) (ASort n n0)) (sn3 c (THeads (Flat +Appl) vs (lift (S i) O v))) (land (arity g c (THeads (Flat Appl) vs (TLRef +i)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (TLRef i)))) (\lambda (H2: +(arity g c (THeads (Flat Appl) vs (lift (S i) O v)) (ASort n n0))).(\lambda +(H3: (sn3 c (THeads (Flat Appl) vs (lift (S i) O v)))).(conj (arity g c +(THeads (Flat Appl) vs (TLRef i)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs +(TLRef i))) (arity_appls_abbr g c d v i H0 vs (ASort n n0) H2) +(sn3_appls_abbr c d v i H0 vs H3)))) H1))))))))))) (\lambda (a0: A).(\lambda +(_: ((\forall (vs: TList).(\forall (i: nat).(\forall (d: C).(\forall (v: +T).(\forall (c: C).((sc3 g a0 c (THeads (Flat Appl) vs (lift (S i) O v))) \to +((getl i c (CHead d (Bind Abbr) v)) \to (sc3 g a0 c (THeads (Flat Appl) vs +(TLRef i)))))))))))).(\lambda (a1: A).(\lambda (H0: ((\forall (vs: +TList).(\forall (i: nat).(\forall (d: C).(\forall (v: T).(\forall (c: +C).((sc3 g a1 c (THeads (Flat Appl) vs (lift (S i) O v))) \to ((getl i c +(CHead d (Bind Abbr) v)) \to (sc3 g a1 c (THeads (Flat Appl) vs (TLRef +i)))))))))))).(\lambda (vs: TList).(\lambda (i: nat).(\lambda (d: C).(\lambda +(v: T).(\lambda (c: C).(\lambda (H1: (land (arity g c (THeads (Flat Appl) vs +(lift (S i) O v)) (AHead a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 +d0 w) \to (\forall (is: PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat +Appl) w (lift1 is (THeads (Flat Appl) vs (lift (S i) O v)))))))))))).(\lambda +(H2: (getl i c (CHead d (Bind Abbr) v))).(let H3 \def H1 in (and_ind (arity g +c (THeads (Flat Appl) vs (lift (S i) O v)) (AHead a0 a1)) (\forall (d0: +C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 c) +\to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (lift +(S i) O v)))))))))) (land (arity g c (THeads (Flat Appl) vs (TLRef i)) (AHead +a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: +PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is +(THeads (Flat Appl) vs (TLRef i))))))))))) (\lambda (H4: (arity g c (THeads +(Flat Appl) vs (lift (S i) O v)) (AHead a0 a1))).(\lambda (H5: ((\forall (d0: +C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 c) +\to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (lift +(S i) O v)))))))))))).(conj (arity g c (THeads (Flat Appl) vs (TLRef i)) +(AHead a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall +(is: PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is +(THeads (Flat Appl) vs (TLRef i)))))))))) (arity_appls_abbr g c d v i H2 vs +(AHead a0 a1) H4) (\lambda (d0: C).(\lambda (w: T).(\lambda (H6: (sc3 g a0 d0 +w)).(\lambda (is: PList).(\lambda (H7: (drop1 is d0 c)).(let H_x \def +(drop1_getl_trans is c d0 H7 Abbr d v i H2) in (let H8 \def H_x in (ex2_ind C +(\lambda (e2: C).(drop1 (ptrans is i) e2 d)) (\lambda (e2: C).(getl (trans is +i) d0 (CHead e2 (Bind Abbr) (lift1 (ptrans is i) v)))) (sc3 g a1 d0 (THead +(Flat Appl) w (lift1 is (THeads (Flat Appl) vs (TLRef i))))) (\lambda (x: +C).(\lambda (_: (drop1 (ptrans is i) x d)).(\lambda (H10: (getl (trans is i) +d0 (CHead x (Bind Abbr) (lift1 (ptrans is i) v)))).(let H_y \def (H0 (TCons w +(lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) (lifts1 is vs) (lift1 is +(TLRef i))) (\lambda (t: T).(sc3 g a1 d0 (THead (Flat Appl) w t))) (eq_ind_r +T (TLRef (trans is i)) (\lambda (t: T).(sc3 g a1 d0 (THead (Flat Appl) w +(THeads (Flat Appl) (lifts1 is vs) t)))) (H_y (trans is i) x (lift1 (ptrans +is i) v) d0 (eq_ind T (lift1 is (lift (S i) O v)) (\lambda (t: T).(sc3 g a1 +d0 (THead (Flat Appl) w (THeads (Flat Appl) (lifts1 is vs) t)))) (eq_ind T +(lift1 is (THeads (Flat Appl) vs (lift (S i) O v))) (\lambda (t: T).(sc3 g a1 +d0 (THead (Flat Appl) w t))) (H5 d0 w H6 is H7) (THeads (Flat Appl) (lifts1 +is vs) (lift1 is (lift (S i) O v))) (lifts1_flat Appl is (lift (S i) O v) +vs)) (lift (S (trans is i)) O (lift1 (ptrans is i) v)) (lift1_free is i v)) +H10) (lift1 is (TLRef i)) (lift1_lref is i)) (lift1 is (THeads (Flat Appl) vs +(TLRef i))) (lifts1_flat Appl is (TLRef i) vs)))))) H8))))))))))) +H3))))))))))))) a)). theorem sc3_cast: \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (c: C).(\forall @@ -506,19 +571,163 @@ t)))))).(\lambda (H4: ((\forall (vs0: TList).(\forall (i0: nat).(let t \def ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a c0 t)))))))))).(H4 vs i c H H0 H1))) H2)))))))))). -axiom sc3_bind: +theorem sc3_bind: \forall (g: G).(\forall (b: B).((not (eq B b Abst)) \to (\forall (a1: A).(\forall (a2: A).(\forall (vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a2 (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a2 c (THeads (Flat Appl) vs (THead (Bind b) v t))))))))))))) -. +\def + \lambda (g: G).(\lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda +(a1: A).(\lambda (a2: A).(A_ind (\lambda (a: A).(\forall (vs: TList).(\forall +(c: C).(\forall (v: T).(\forall (t: T).((sc3 g a (CHead c (Bind b) v) (THeads +(Flat Appl) (lifts (S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a c (THeads +(Flat Appl) vs (THead (Bind b) v t)))))))))) (\lambda (n: nat).(\lambda (n0: +nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: T).(\lambda (t: +T).(\lambda (H0: (land (arity g (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t) (ASort n n0)) (sn3 (CHead c (Bind b) v) (THeads (Flat +Appl) (lifts (S O) O vs) t)))).(\lambda (H1: (sc3 g a1 c v)).(let H2 \def H0 +in (and_ind (arity g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O +vs) t) (ASort n n0)) (sn3 (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S +O) O vs) t)) (land (arity g c (THeads (Flat Appl) vs (THead (Bind b) v t)) +(ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Bind b) v t)))) (\lambda +(H3: (arity g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t) +(ASort n n0))).(\lambda (H4: (sn3 (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Bind +b) v t)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Bind b) v t))) +(arity_appls_bind g b H c v a1 (sc3_arity_gen g c v a1 H1) t vs (ASort n n0) +H3) (sn3_appls_bind b H c v (sc3_sn3 g a1 c v H1) vs t H4)))) H2)))))))))) +(\lambda (a: A).(\lambda (_: ((\forall (vs: TList).(\forall (c: C).(\forall +(v: T).(\forall (t: T).((sc3 g a (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a c (THeads (Flat Appl) +vs (THead (Bind b) v t))))))))))).(\lambda (a0: A).(\lambda (H1: ((\forall +(vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a0 (CHead +c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t)) \to ((sc3 g a1 c v) +\to (sc3 g a0 c (THeads (Flat Appl) vs (THead (Bind b) v +t))))))))))).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: T).(\lambda +(t: T).(\lambda (H2: (land (arity g (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t) (AHead a a0)) (\forall (d: C).(\forall (w: T).((sc3 g a +d w) \to (\forall (is: PList).((drop1 is d (CHead c (Bind b) v)) \to (sc3 g +a0 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) (lifts (S O) O vs) +t))))))))))).(\lambda (H3: (sc3 g a1 c v)).(let H4 \def H2 in (and_ind (arity +g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t) (AHead a +a0)) (\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: +PList).((drop1 is d (CHead c (Bind b) v)) \to (sc3 g a0 d (THead (Flat Appl) +w (lift1 is (THeads (Flat Appl) (lifts (S O) O vs) t))))))))) (land (arity g +c (THeads (Flat Appl) vs (THead (Bind b) v t)) (AHead a a0)) (\forall (d: +C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d c) +\to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead +(Bind b) v t))))))))))) (\lambda (H5: (arity g (CHead c (Bind b) v) (THeads +(Flat Appl) (lifts (S O) O vs) t) (AHead a a0))).(\lambda (H6: ((\forall (d: +C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d +(CHead c (Bind b) v)) \to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads +(Flat Appl) (lifts (S O) O vs) t))))))))))).(conj (arity g c (THeads (Flat +Appl) vs (THead (Bind b) v t)) (AHead a a0)) (\forall (d: C).(\forall (w: +T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d +(THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead (Bind b) v +t)))))))))) (arity_appls_bind g b H c v a1 (sc3_arity_gen g c v a1 H3) t vs +(AHead a a0) H5) (\lambda (d: C).(\lambda (w: T).(\lambda (H7: (sc3 g a d +w)).(\lambda (is: PList).(\lambda (H8: (drop1 is d c)).(let H_y \def (H1 +(TCons w (lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) (lifts1 is vs) +(lift1 is (THead (Bind b) v t))) (\lambda (t0: T).(sc3 g a0 d (THead (Flat +Appl) w t0))) (eq_ind_r T (THead (Bind b) (lift1 is v) (lift1 (Ss is) t)) +(\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w (THeads (Flat Appl) (lifts1 +is vs) t0)))) (H_y d (lift1 is v) (lift1 (Ss is) t) (eq_ind TList (lifts1 (Ss +is) (lifts (S O) O vs)) (\lambda (t0: TList).(sc3 g a0 (CHead d (Bind b) +(lift1 is v)) (THead (Flat Appl) (lift (S O) O w) (THeads (Flat Appl) t0 +(lift1 (Ss is) t))))) (eq_ind T (lift1 (Ss is) (THeads (Flat Appl) (lifts (S +O) O vs) t)) (\lambda (t0: T).(sc3 g a0 (CHead d (Bind b) (lift1 is v)) +(THead (Flat Appl) (lift (S O) O w) t0))) (H6 (CHead d (Bind b) (lift1 is v)) +(lift (S O) O w) (sc3_lift g a d w H7 (CHead d (Bind b) (lift1 is v)) (S O) O +(drop_drop (Bind b) O d d (drop_refl d) (lift1 is v))) (Ss is) +(drop1_skip_bind b c is d v H8)) (THeads (Flat Appl) (lifts1 (Ss is) (lifts +(S O) O vs)) (lift1 (Ss is) t)) (lifts1_flat Appl (Ss is) t (lifts (S O) O +vs))) (lifts (S O) O (lifts1 is vs)) (lifts1_xhg is vs)) (sc3_lift1 g c a1 is +d v H3 H8)) (lift1 is (THead (Bind b) v t)) (lift1_bind b is v t)) (lift1 is +(THeads (Flat Appl) vs (THead (Bind b) v t))) (lifts1_flat Appl is (THead +(Bind b) v t) vs))))))))))) H4)))))))))))) a2))))). -axiom sc3_appl: +theorem sc3_appl: \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a2 c (THeads (Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to (\forall (w: T).((sc3 g (asucc g a1) c w) \to (sc3 g a2 c (THeads (Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t)))))))))))))) -. +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(A_ind (\lambda (a: +A).(\forall (vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 +g a c (THeads (Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) +\to (\forall (w: T).((sc3 g (asucc g a1) c w) \to (sc3 g a c (THeads (Flat +Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))))))))))))) (\lambda +(n: nat).(\lambda (n0: nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: +T).(\lambda (t: T).(\lambda (H: (land (arity g c (THeads (Flat Appl) vs +(THead (Bind Abbr) v t)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead +(Bind Abbr) v t))))).(\lambda (H0: (sc3 g a1 c v)).(\lambda (w: T).(\lambda +(H1: (sc3 g (asucc g a1) c w)).(let H2 \def H in (and_ind (arity g c (THeads +(Flat Appl) vs (THead (Bind Abbr) v t)) (ASort n n0)) (sn3 c (THeads (Flat +Appl) vs (THead (Bind Abbr) v t))) (land (arity g c (THeads (Flat Appl) vs +(THead (Flat Appl) v (THead (Bind Abst) w t))) (ASort n n0)) (sn3 c (THeads +(Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))))) (\lambda (H3: +(arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) (ASort n +n0))).(\lambda (H4: (sn3 c (THeads (Flat Appl) vs (THead (Bind Abbr) v +t)))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Appl) v (THead +(Bind Abst) w t))) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat +Appl) v (THead (Bind Abst) w t)))) (arity_appls_appl g c v a1 (sc3_arity_gen +g c v a1 H0) w (sc3_arity_gen g c w (asucc g a1) H1) t vs (ASort n n0) H3) +(sn3_appls_beta c v t vs H4 w (sc3_sn3 g (asucc g a1) c w H1))))) +H2)))))))))))) (\lambda (a: A).(\lambda (_: ((\forall (vs: TList).(\forall +(c: C).(\forall (v: T).(\forall (t: T).((sc3 g a c (THeads (Flat Appl) vs +(THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to (\forall (w: T).((sc3 g +(asucc g a1) c w) \to (sc3 g a c (THeads (Flat Appl) vs (THead (Flat Appl) v +(THead (Bind Abst) w t)))))))))))))).(\lambda (a0: A).(\lambda (H0: ((\forall +(vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a0 c +(THeads (Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to +(\forall (w: T).((sc3 g (asucc g a1) c w) \to (sc3 g a0 c (THeads (Flat Appl) +vs (THead (Flat Appl) v (THead (Bind Abst) w t)))))))))))))).(\lambda (vs: +TList).(\lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H1: (land +(arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) (AHead a a0)) +(\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads +(Flat Appl) vs (THead (Bind Abbr) v t)))))))))))).(\lambda (H2: (sc3 g a1 c +v)).(\lambda (w: T).(\lambda (H3: (sc3 g (asucc g a1) c w)).(let H4 \def H1 +in (and_ind (arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) (AHead +a a0)) (\forall (d: C).(\forall (w0: T).((sc3 g a d w0) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w0 (lift1 is +(THeads (Flat Appl) vs (THead (Bind Abbr) v t)))))))))) (land (arity g c +(THeads (Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))) (AHead +a a0)) (\forall (d: C).(\forall (w0: T).((sc3 g a d w0) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w0 (lift1 is +(THeads (Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w +t)))))))))))) (\lambda (H5: (arity g c (THeads (Flat Appl) vs (THead (Bind +Abbr) v t)) (AHead a a0))).(\lambda (H6: ((\forall (d: C).(\forall (w0: +T).((sc3 g a d w0) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d +(THead (Flat Appl) w0 (lift1 is (THeads (Flat Appl) vs (THead (Bind Abbr) v +t)))))))))))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Appl) v +(THead (Bind Abst) w t))) (AHead a a0)) (\forall (d: C).(\forall (w0: +T).((sc3 g a d w0) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d +(THead (Flat Appl) w0 (lift1 is (THeads (Flat Appl) vs (THead (Flat Appl) v +(THead (Bind Abst) w t))))))))))) (arity_appls_appl g c v a1 (sc3_arity_gen g +c v a1 H2) w (sc3_arity_gen g c w (asucc g a1) H3) t vs (AHead a a0) H5) +(\lambda (d: C).(\lambda (w0: T).(\lambda (H7: (sc3 g a d w0)).(\lambda (is: +PList).(\lambda (H8: (drop1 is d c)).(eq_ind_r T (THeads (Flat Appl) (lifts1 +is vs) (lift1 is (THead (Flat Appl) v (THead (Bind Abst) w t)))) (\lambda +(t0: T).(sc3 g a0 d (THead (Flat Appl) w0 t0))) (eq_ind_r T (THead (Flat +Appl) (lift1 is v) (lift1 is (THead (Bind Abst) w t))) (\lambda (t0: T).(sc3 +g a0 d (THead (Flat Appl) w0 (THeads (Flat Appl) (lifts1 is vs) t0)))) +(eq_ind_r T (THead (Bind Abst) (lift1 is w) (lift1 (Ss is) t)) (\lambda (t0: +T).(sc3 g a0 d (THead (Flat Appl) w0 (THeads (Flat Appl) (lifts1 is vs) +(THead (Flat Appl) (lift1 is v) t0))))) (let H_y \def (H0 (TCons w0 (lifts1 +is vs))) in (H_y d (lift1 is v) (lift1 (Ss is) t) (eq_ind T (lift1 is (THead +(Bind Abbr) v t)) (\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w0 (THeads +(Flat Appl) (lifts1 is vs) t0)))) (eq_ind T (lift1 is (THeads (Flat Appl) vs +(THead (Bind Abbr) v t))) (\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w0 +t0))) (H6 d w0 H7 is H8) (THeads (Flat Appl) (lifts1 is vs) (lift1 is (THead +(Bind Abbr) v t))) (lifts1_flat Appl is (THead (Bind Abbr) v t) vs)) (THead +(Bind Abbr) (lift1 is v) (lift1 (Ss is) t)) (lift1_bind Abbr is v t)) +(sc3_lift1 g c a1 is d v H2 H8) (lift1 is w) (sc3_lift1 g c (asucc g a1) is d +w H3 H8))) (lift1 is (THead (Bind Abst) w t)) (lift1_bind Abst is w t)) +(lift1 is (THead (Flat Appl) v (THead (Bind Abst) w t))) (lift1_flat Appl is +v (THead (Bind Abst) w t))) (lift1 is (THeads (Flat Appl) vs (THead (Flat +Appl) v (THead (Bind Abst) w t)))) (lifts1_flat Appl is (THead (Flat Appl) v +(THead (Bind Abst) w t)) vs)))))))))) H4)))))))))))))) a2))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/defs.ma index 46e2fda80..03b7e952a 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/defs.ma @@ -18,7 +18,7 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/defs". include "pr3/defs.ma". -inductive sn3 (c:C): T \to Prop \def +inductive sn3 (c: C): T \to Prop \def | sn3_sing: \forall (t1: T).(((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2))))) \to (sn3 c t1)). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/fwd.ma index 9b751cedf..32cb16386 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/fwd.ma @@ -20,6 +20,59 @@ include "sn3/defs.ma". include "pr3/props.ma". +theorem sn3_gen_bind: + \forall (b: B).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c +(THead (Bind b) u t)) \to (land (sn3 c u) (sn3 (CHead c (Bind b) u) t)))))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: +(sn3 c (THead (Bind b) u t))).(insert_eq T (THead (Bind b) u t) (\lambda (t0: +T).(sn3 c t0)) (land (sn3 c u) (sn3 (CHead c (Bind b) u) t)) (\lambda (y: +T).(\lambda (H0: (sn3 c y)).(unintro T t (\lambda (t0: T).((eq T y (THead +(Bind b) u t0)) \to (land (sn3 c u) (sn3 (CHead c (Bind b) u) t0)))) (unintro +T u (\lambda (t0: T).(\forall (x: T).((eq T y (THead (Bind b) t0 x)) \to +(land (sn3 c t0) (sn3 (CHead c (Bind b) t0) x))))) (sn3_ind c (\lambda (t0: +T).(\forall (x: T).(\forall (x0: T).((eq T t0 (THead (Bind b) x x0)) \to +(land (sn3 c x) (sn3 (CHead c (Bind b) x) x0)))))) (\lambda (t1: T).(\lambda +(H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 +c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) +\to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).(\forall +(x0: T).((eq T t2 (THead (Bind b) x x0)) \to (land (sn3 c x) (sn3 (CHead c +(Bind b) x) x0)))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T +t1 (THead (Bind b) x x0))).(let H4 \def (eq_ind T t1 (\lambda (t0: +T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c +t0 t2) \to (\forall (x1: T).(\forall (x2: T).((eq T t2 (THead (Bind b) x1 +x2)) \to (land (sn3 c x1) (sn3 (CHead c (Bind b) x1) x2))))))))) H2 (THead +(Bind b) x x0) H3) in (let H5 \def (eq_ind T t1 (\lambda (t0: T).(\forall +(t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to +(sn3 c t2))))) H1 (THead (Bind b) x x0) H3) in (conj (sn3 c x) (sn3 (CHead c +(Bind b) x) x0) (sn3_sing c x (\lambda (t2: T).(\lambda (H6: (((eq T x t2) +\to (\forall (P: Prop).P)))).(\lambda (H7: (pr3 c x t2)).(let H8 \def (H4 +(THead (Bind b) t2 x0) (\lambda (H8: (eq T (THead (Bind b) x x0) (THead (Bind +b) t2 x0))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | +(TLRef _) \Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Bind b) x +x0) (THead (Bind b) t2 x0) H8) in (let H10 \def (eq_ind_r T t2 (\lambda (t0: +T).(pr3 c x t0)) H7 x H9) in (let H11 \def (eq_ind_r T t2 (\lambda (t0: +T).((eq T x t0) \to (\forall (P0: Prop).P0))) H6 x H9) in (H11 (refl_equal T +x) P)))))) (pr3_head_12 c x t2 H7 (Bind b) x0 x0 (pr3_refl (CHead c (Bind b) +t2) x0)) t2 x0 (refl_equal T (THead (Bind b) t2 x0))) in (and_ind (sn3 c t2) +(sn3 (CHead c (Bind b) t2) x0) (sn3 c t2) (\lambda (H9: (sn3 c t2)).(\lambda +(_: (sn3 (CHead c (Bind b) t2) x0)).H9)) H8)))))) (sn3_sing (CHead c (Bind b) +x) x0 (\lambda (t2: T).(\lambda (H6: (((eq T x0 t2) \to (\forall (P: +Prop).P)))).(\lambda (H7: (pr3 (CHead c (Bind b) x) x0 t2)).(let H8 \def (H4 +(THead (Bind b) x t2) (\lambda (H8: (eq T (THead (Bind b) x x0) (THead (Bind +b) x t2))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | +(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind b) x +x0) (THead (Bind b) x t2) H8) in (let H10 \def (eq_ind_r T t2 (\lambda (t0: +T).(pr3 (CHead c (Bind b) x) x0 t0)) H7 x0 H9) in (let H11 \def (eq_ind_r T +t2 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H6 x0 H9) in +(H11 (refl_equal T x0) P)))))) (pr3_head_12 c x x (pr3_refl c x) (Bind b) x0 +t2 H7) x t2 (refl_equal T (THead (Bind b) x t2))) in (and_ind (sn3 c x) (sn3 +(CHead c (Bind b) x) t2) (sn3 (CHead c (Bind b) x) t2) (\lambda (_: (sn3 c +x)).(\lambda (H10: (sn3 (CHead c (Bind b) x) t2)).H10)) H8))))))))))))))) y +H0))))) H))))). + theorem sn3_gen_flat: \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c (THead (Flat f) u t)) \to (land (sn3 c u) (sn3 c t)))))) @@ -68,6 +121,35 @@ T x0) P)))))) (pr3_thin_dx c x0 t2 H7 x f) x t2 (refl_equal T (THead (Flat f) x t2))) in (and_ind (sn3 c x) (sn3 c t2) (sn3 c t2) (\lambda (_: (sn3 c x)).(\lambda (H10: (sn3 c t2)).H10)) H8))))))))))))))) y H0))))) H))))). +theorem sn3_gen_head: + \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c +(THead k u t)) \to (sn3 c u))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (c: C).(\forall (u: +T).(\forall (t: T).((sn3 c (THead k0 u t)) \to (sn3 c u)))))) (\lambda (b: +B).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead +(Bind b) u t))).(let H_x \def (sn3_gen_bind b c u t H) in (let H0 \def H_x in +(and_ind (sn3 c u) (sn3 (CHead c (Bind b) u) t) (sn3 c u) (\lambda (H1: (sn3 +c u)).(\lambda (_: (sn3 (CHead c (Bind b) u) t)).H1)) H0)))))))) (\lambda (f: +F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead +(Flat f) u t))).(let H_x \def (sn3_gen_flat f c u t H) in (let H0 \def H_x in +(and_ind (sn3 c u) (sn3 c t) (sn3 c u) (\lambda (H1: (sn3 c u)).(\lambda (_: +(sn3 c t)).H1)) H0)))))))) k). + +theorem sn3_gen_cflat: + \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 (CHead +c (Flat f) u) t) \to (sn3 c t))))) +\def + \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: +(sn3 (CHead c (Flat f) u) t)).(sn3_ind (CHead c (Flat f) u) (\lambda (t0: +T).(sn3 c t0)) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 +t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Flat f) u) t1 t2) \to +(sn3 (CHead c (Flat f) u) t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T +t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Flat f) u) t1 t2) \to +(sn3 c t2)))))).(sn3_sing c t1 (\lambda (t2: T).(\lambda (H2: (((eq T t1 t2) +\to (\forall (P: Prop).P)))).(\lambda (H3: (pr3 c t1 t2)).(H1 t2 H2 +(pr3_cflat c t1 t2 H3 f u))))))))) t H))))). + theorem sn3_gen_lift: \forall (c1: C).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).((sn3 c1 (lift h d t)) \to (\forall (c2: C).((drop h d c1 c2) \to (sn3 c2 t))))))) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/props.ma index 6a21455d2..c72798ba0 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/props.ma @@ -141,6 +141,477 @@ H11))) H15))))) H13))) t2 H9))))))) H8)) (\lambda (H8: (pr2 c t0 t2)).(sn3_pr3_trans c t0 (sn3_sing c t0 H3) t2 (pr3_pr2 c t0 t2 H8))) H7))))))))) t H2)))))) u H))). +theorem sn3_cflat: + \forall (c: C).(\forall (t: T).((sn3 c t) \to (\forall (f: F).(\forall (u: +T).(sn3 (CHead c (Flat f) u) t))))) +\def + \lambda (c: C).(\lambda (t: T).(\lambda (H: (sn3 c t)).(\lambda (f: +F).(\lambda (u: T).(sn3_ind c (\lambda (t0: T).(sn3 (CHead c (Flat f) u) t0)) +(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall +(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall +(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to +(sn3 (CHead c (Flat f) u) t2)))))).(sn3_pr2_intro (CHead c (Flat f) u) t1 +(\lambda (t2: T).(\lambda (H2: (((eq T t1 t2) \to (\forall (P: +Prop).P)))).(\lambda (H3: (pr2 (CHead c (Flat f) u) t1 t2)).(H1 t2 H2 +(pr3_pr2 c t1 t2 (pr2_gen_cflat f c u t1 t2 H3)))))))))) t H))))). + +theorem sn3_shift: + \forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sn3 c +(THead (Bind b) v t)) \to (sn3 (CHead c (Bind b) v) t))))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H: +(sn3 c (THead (Bind b) v t))).(let H_x \def (sn3_gen_bind b c v t H) in (let +H0 \def H_x in (and_ind (sn3 c v) (sn3 (CHead c (Bind b) v) t) (sn3 (CHead c +(Bind b) v) t) (\lambda (_: (sn3 c v)).(\lambda (H2: (sn3 (CHead c (Bind b) +v) t)).H2)) H0))))))). + +theorem sn3_change: + \forall (b: B).((not (eq B b Abbr)) \to (\forall (c: C).(\forall (v1: +T).(\forall (t: T).((sn3 (CHead c (Bind b) v1) t) \to (\forall (v2: T).(sn3 +(CHead c (Bind b) v2) t))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abbr))).(\lambda (c: C).(\lambda +(v1: T).(\lambda (t: T).(\lambda (H0: (sn3 (CHead c (Bind b) v1) t)).(\lambda +(v2: T).(sn3_ind (CHead c (Bind b) v1) (\lambda (t0: T).(sn3 (CHead c (Bind +b) v2) t0)) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) +\to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) v1) t1 t2) \to (sn3 +(CHead c (Bind b) v1) t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 +t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) v1) t1 t2) \to +(sn3 (CHead c (Bind b) v2) t2)))))).(sn3_pr2_intro (CHead c (Bind b) v2) t1 +(\lambda (t2: T).(\lambda (H3: (((eq T t1 t2) \to (\forall (P: +Prop).P)))).(\lambda (H4: (pr2 (CHead c (Bind b) v2) t1 t2)).(H2 t2 H3 +(pr3_pr2 (CHead c (Bind b) v1) t1 t2 (pr2_change b H c v2 t1 t2 H4 +v1)))))))))) t H0))))))). + +theorem sn3_cpr3_trans: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall +(k: K).(\forall (t: T).((sn3 (CHead c k u1) t) \to (sn3 (CHead c k u2) +t))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 +u2)).(\lambda (k: K).(\lambda (t: T).(\lambda (H0: (sn3 (CHead c k u1) +t)).(sn3_ind (CHead c k u1) (\lambda (t0: T).(sn3 (CHead c k u2) t0)) +(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall +(P: Prop).P))) \to ((pr3 (CHead c k u1) t1 t2) \to (sn3 (CHead c k u1) +t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: +Prop).P))) \to ((pr3 (CHead c k u1) t1 t2) \to (sn3 (CHead c k u2) +t2)))))).(sn3_sing (CHead c k u2) t1 (\lambda (t2: T).(\lambda (H3: (((eq T +t1 t2) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr3 (CHead c k u2) t1 +t2)).(H2 t2 H3 (pr3_pr3_pr3_t c u1 u2 H t1 t2 k H4))))))))) t H0))))))). + +theorem sn3_bind: + \forall (b: B).(\forall (c: C).(\forall (u: T).((sn3 c u) \to (\forall (t: +T).((sn3 (CHead c (Bind b) u) t) \to (sn3 c (THead (Bind b) u t))))))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (sn3 c +u)).(sn3_ind c (\lambda (t: T).(\forall (t0: T).((sn3 (CHead c (Bind b) t) +t0) \to (sn3 c (THead (Bind b) t t0))))) (\lambda (t1: T).(\lambda (_: +((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 +t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to +(\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (t: T).((sn3 (CHead c +(Bind b) t2) t) \to (sn3 c (THead (Bind b) t2 t))))))))).(\lambda (t: +T).(\lambda (H2: (sn3 (CHead c (Bind b) t1) t)).(sn3_ind (CHead c (Bind b) +t1) (\lambda (t0: T).(sn3 c (THead (Bind b) t1 t0))) (\lambda (t2: +T).(\lambda (H3: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: +Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 (CHead c (Bind b) +t1) t3)))))).(\lambda (H4: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: +Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 c (THead (Bind b) +t1 t3))))))).(sn3_sing c (THead (Bind b) t1 t2) (\lambda (t3: T).(\lambda +(H5: (((eq T (THead (Bind b) t1 t2) t3) \to (\forall (P: Prop).P)))).(\lambda +(H6: (pr3 c (THead (Bind b) t1 t2) t3)).(let H_x \def (bind_dec_not b Abst) +in (let H7 \def H_x in (or_ind (eq B b Abst) (not (eq B b Abst)) (sn3 c t3) +(\lambda (H8: (eq B b Abst)).(let H9 \def (eq_ind B b (\lambda (b0: B).(pr3 c +(THead (Bind b0) t1 t2) t3)) H6 Abst H8) in (let H10 \def (eq_ind B b +(\lambda (b0: B).((eq T (THead (Bind b0) t1 t2) t3) \to (\forall (P: +Prop).P))) H5 Abst H8) in (let H11 \def (eq_ind B b (\lambda (b0: B).(\forall +(t4: T).((((eq T t2 t4) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind +b0) t1) t2 t4) \to (sn3 c (THead (Bind b0) t1 t4)))))) H4 Abst H8) in (let +H12 \def (eq_ind B b (\lambda (b0: B).(\forall (t4: T).((((eq T t2 t4) \to +(\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b0) t1) t2 t4) \to (sn3 +(CHead c (Bind b0) t1) t4))))) H3 Abst H8) in (let H13 \def (eq_ind B b +(\lambda (b0: B).(\forall (t4: T).((((eq T t1 t4) \to (\forall (P: Prop).P))) +\to ((pr3 c t1 t4) \to (\forall (t0: T).((sn3 (CHead c (Bind b0) t4) t0) \to +(sn3 c (THead (Bind b0) t4 t0)))))))) H1 Abst H8) in (let H14 \def +(pr3_gen_abst c t1 t2 t3 H9) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: +T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b0: B).(\forall +(u0: T).(pr3 (CHead c (Bind b0) u0) t2 t4))))) (sn3 c t3) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H15: (eq T t3 (THead (Bind Abst) x0 +x1))).(\lambda (H16: (pr3 c t1 x0)).(\lambda (H17: ((\forall (b0: B).(\forall +(u0: T).(pr3 (CHead c (Bind b0) u0) t2 x1))))).(let H18 \def (eq_ind T t3 +(\lambda (t0: T).((eq T (THead (Bind Abst) t1 t2) t0) \to (\forall (P: +Prop).P))) H10 (THead (Bind Abst) x0 x1) H15) in (eq_ind_r T (THead (Bind +Abst) x0 x1) (\lambda (t0: T).(sn3 c t0)) (let H_x0 \def (term_dec t1 x0) in +(let H19 \def H_x0 in (or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: +Prop).P)) (sn3 c (THead (Bind Abst) x0 x1)) (\lambda (H20: (eq T t1 x0)).(let +H21 \def (eq_ind_r T x0 (\lambda (t0: T).((eq T (THead (Bind Abst) t1 t2) +(THead (Bind Abst) t0 x1)) \to (\forall (P: Prop).P))) H18 t1 H20) in (let +H22 \def (eq_ind_r T x0 (\lambda (t0: T).(pr3 c t1 t0)) H16 t1 H20) in +(eq_ind T t1 (\lambda (t0: T).(sn3 c (THead (Bind Abst) t0 x1))) (let H_x1 +\def (term_dec t2 x1) in (let H23 \def H_x1 in (or_ind (eq T t2 x1) ((eq T t2 +x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind Abst) t1 x1)) (\lambda +(H24: (eq T t2 x1)).(let H25 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T +(THead (Bind Abst) t1 t2) (THead (Bind Abst) t1 t0)) \to (\forall (P: +Prop).P))) H21 t2 H24) in (let H26 \def (eq_ind_r T x1 (\lambda (t0: +T).(\forall (b0: B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) t2 t0)))) +H17 t2 H24) in (eq_ind T t2 (\lambda (t0: T).(sn3 c (THead (Bind Abst) t1 +t0))) (H25 (refl_equal T (THead (Bind Abst) t1 t2)) (sn3 c (THead (Bind Abst) +t1 t2))) x1 H24)))) (\lambda (H24: (((eq T t2 x1) \to (\forall (P: +Prop).P)))).(H11 x1 H24 (H17 Abst t1))) H23))) x0 H20)))) (\lambda (H20: +(((eq T t1 x0) \to (\forall (P: Prop).P)))).(let H_x1 \def (term_dec t2 x1) +in (let H21 \def H_x1 in (or_ind (eq T t2 x1) ((eq T t2 x1) \to (\forall (P: +Prop).P)) (sn3 c (THead (Bind Abst) x0 x1)) (\lambda (H22: (eq T t2 x1)).(let +H23 \def (eq_ind_r T x1 (\lambda (t0: T).(\forall (b0: B).(\forall (u0: +T).(pr3 (CHead c (Bind b0) u0) t2 t0)))) H17 t2 H22) in (eq_ind T t2 (\lambda +(t0: T).(sn3 c (THead (Bind Abst) x0 t0))) (H13 x0 H20 H16 t2 (sn3_cpr3_trans +c t1 x0 H16 (Bind Abst) t2 (sn3_sing (CHead c (Bind Abst) t1) t2 H12))) x1 +H22))) (\lambda (H22: (((eq T t2 x1) \to (\forall (P: Prop).P)))).(H13 x0 H20 +H16 x1 (sn3_cpr3_trans c t1 x0 H16 (Bind Abst) x1 (H12 x1 H22 (H17 Abst +t1))))) H21)))) H19))) t3 H15))))))) H14)))))))) (\lambda (H8: (not (eq B b +Abst))).(let H_x0 \def (pr3_gen_bind b H8 c t1 t2 t3 H6) in (let H9 \def H_x0 +in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind +b) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: +T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) t2 t4)))) (pr3 (CHead c (Bind +b) t1) t2 (lift (S O) O t3)) (sn3 c t3) (\lambda (H10: (ex3_2 T T (\lambda +(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 +(CHead c (Bind b) t1) t2 t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda +(t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 (CHead c (Bind b) +t1) t2 t4))) (sn3 c t3) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq +T t3 (THead (Bind b) x0 x1))).(\lambda (H12: (pr3 c t1 x0)).(\lambda (H13: +(pr3 (CHead c (Bind b) t1) t2 x1)).(let H14 \def (eq_ind T t3 (\lambda (t0: +T).((eq T (THead (Bind b) t1 t2) t0) \to (\forall (P: Prop).P))) H5 (THead +(Bind b) x0 x1) H11) in (eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: +T).(sn3 c t0)) (let H_x1 \def (term_dec t1 x0) in (let H15 \def H_x1 in +(or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: Prop).P)) (sn3 c (THead +(Bind b) x0 x1)) (\lambda (H16: (eq T t1 x0)).(let H17 \def (eq_ind_r T x0 +(\lambda (t0: T).((eq T (THead (Bind b) t1 t2) (THead (Bind b) t0 x1)) \to +(\forall (P: Prop).P))) H14 t1 H16) in (let H18 \def (eq_ind_r T x0 (\lambda +(t0: T).(pr3 c t1 t0)) H12 t1 H16) in (eq_ind T t1 (\lambda (t0: T).(sn3 c +(THead (Bind b) t0 x1))) (let H_x2 \def (term_dec t2 x1) in (let H19 \def +H_x2 in (or_ind (eq T t2 x1) ((eq T t2 x1) \to (\forall (P: Prop).P)) (sn3 c +(THead (Bind b) t1 x1)) (\lambda (H20: (eq T t2 x1)).(let H21 \def (eq_ind_r +T x1 (\lambda (t0: T).((eq T (THead (Bind b) t1 t2) (THead (Bind b) t1 t0)) +\to (\forall (P: Prop).P))) H17 t2 H20) in (let H22 \def (eq_ind_r T x1 +(\lambda (t0: T).(pr3 (CHead c (Bind b) t1) t2 t0)) H13 t2 H20) in (eq_ind T +t2 (\lambda (t0: T).(sn3 c (THead (Bind b) t1 t0))) (H21 (refl_equal T (THead +(Bind b) t1 t2)) (sn3 c (THead (Bind b) t1 t2))) x1 H20)))) (\lambda (H20: +(((eq T t2 x1) \to (\forall (P: Prop).P)))).(H4 x1 H20 H13)) H19))) x0 +H16)))) (\lambda (H16: (((eq T t1 x0) \to (\forall (P: Prop).P)))).(let H_x2 +\def (term_dec t2 x1) in (let H17 \def H_x2 in (or_ind (eq T t2 x1) ((eq T t2 +x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind b) x0 x1)) (\lambda (H18: +(eq T t2 x1)).(let H19 \def (eq_ind_r T x1 (\lambda (t0: T).(pr3 (CHead c +(Bind b) t1) t2 t0)) H13 t2 H18) in (eq_ind T t2 (\lambda (t0: T).(sn3 c +(THead (Bind b) x0 t0))) (H1 x0 H16 H12 t2 (sn3_cpr3_trans c t1 x0 H12 (Bind +b) t2 (sn3_sing (CHead c (Bind b) t1) t2 H3))) x1 H18))) (\lambda (H18: (((eq +T t2 x1) \to (\forall (P: Prop).P)))).(H1 x0 H16 H12 x1 (sn3_cpr3_trans c t1 +x0 H12 (Bind b) x1 (H3 x1 H18 H13)))) H17)))) H15))) t3 H11))))))) H10)) +(\lambda (H10: (pr3 (CHead c (Bind b) t1) t2 (lift (S O) O +t3))).(sn3_gen_lift (CHead c (Bind b) t1) t3 (S O) O (sn3_pr3_trans (CHead c +(Bind b) t1) t2 (sn3_pr2_intro (CHead c (Bind b) t1) t2 (\lambda (t0: +T).(\lambda (H11: (((eq T t2 t0) \to (\forall (P: Prop).P)))).(\lambda (H12: +(pr2 (CHead c (Bind b) t1) t2 t0)).(H3 t0 H11 (pr3_pr2 (CHead c (Bind b) t1) +t2 t0 H12)))))) (lift (S O) O t3) H10) c (drop_drop (Bind b) O c c (drop_refl +c) t1))) H9)))) H7)))))))))) t H2)))))) u H)))). + +theorem sn3_beta: + \forall (c: C).(\forall (v: T).(\forall (t: T).((sn3 c (THead (Bind Abbr) v +t)) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) v (THead +(Bind Abst) w t)))))))) +\def + \lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead +(Bind Abbr) v t))).(insert_eq T (THead (Bind Abbr) v t) (\lambda (t0: T).(sn3 +c t0)) (\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) v (THead +(Bind Abst) w t))))) (\lambda (y: T).(\lambda (H0: (sn3 c y)).(unintro T t +(\lambda (t0: T).((eq T y (THead (Bind Abbr) v t0)) \to (\forall (w: T).((sn3 +c w) \to (sn3 c (THead (Flat Appl) v (THead (Bind Abst) w t0))))))) (unintro +T v (\lambda (t0: T).(\forall (x: T).((eq T y (THead (Bind Abbr) t0 x)) \to +(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) t0 (THead (Bind +Abst) w x)))))))) (sn3_ind c (\lambda (t0: T).(\forall (x: T).(\forall (x0: +T).((eq T t0 (THead (Bind Abbr) x x0)) \to (\forall (w: T).((sn3 c w) \to +(sn3 c (THead (Flat Appl) x (THead (Bind Abst) w x0))))))))) (\lambda (t1: +T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: +Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall +(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to +(\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Bind Abbr) x x0)) \to +(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) x (THead (Bind Abst) +w x0))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t1 +(THead (Bind Abbr) x x0))).(\lambda (w: T).(\lambda (H4: (sn3 c w)).(let H5 +\def (eq_ind T t1 (\lambda (t0: T).(\forall (t2: T).((((eq T t0 t2) \to +(\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (\forall (x1: T).(\forall (x2: +T).((eq T t2 (THead (Bind Abbr) x1 x2)) \to (\forall (w0: T).((sn3 c w0) \to +(sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) w0 x2)))))))))))) H2 (THead +(Bind Abbr) x x0) H3) in (let H6 \def (eq_ind T t1 (\lambda (t0: T).(\forall +(t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to +(sn3 c t2))))) H1 (THead (Bind Abbr) x x0) H3) in (sn3_ind c (\lambda (t0: +T).(sn3 c (THead (Flat Appl) x (THead (Bind Abst) t0 x0)))) (\lambda (t2: +T).(\lambda (H7: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: +Prop).P))) \to ((pr3 c t2 t3) \to (sn3 c t3)))))).(\lambda (H8: ((\forall +(t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to +(sn3 c (THead (Flat Appl) x (THead (Bind Abst) t3 x0)))))))).(sn3_pr2_intro c +(THead (Flat Appl) x (THead (Bind Abst) t2 x0)) (\lambda (t3: T).(\lambda +(H9: (((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t3) \to (\forall +(P: Prop).P)))).(\lambda (H10: (pr2 c (THead (Flat Appl) x (THead (Bind Abst) +t2 x0)) t3)).(let H11 \def (pr2_gen_appl c x (THead (Bind Abst) t2 x0) t3 +H10) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) +(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind Abst) t2 x0) t4)))) +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T (THead (Bind Abst) t2 x0) (THead (Bind Abst) y1 z1)))))) (\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind +b) u) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c t3) +(\lambda (H12: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) +(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind Abst) t2 x0) +t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) +(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind Abst) t2 x0) t4))) (sn3 +c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H13: (eq T t3 (THead (Flat +Appl) x1 x2))).(\lambda (H14: (pr2 c x x1)).(\lambda (H15: (pr2 c (THead +(Bind Abst) t2 x0) x2)).(let H16 \def (eq_ind T t3 (\lambda (t0: T).((eq T +(THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) \to (\forall (P: +Prop).P))) H9 (THead (Flat Appl) x1 x2) H13) in (eq_ind_r T (THead (Flat +Appl) x1 x2) (\lambda (t0: T).(sn3 c t0)) (let H17 \def (pr2_gen_abst c t2 x0 +x2 H15) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead +(Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t2 u2))) +(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead +c (Bind b) u) x0 t4))))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (x3: +T).(\lambda (x4: T).(\lambda (H18: (eq T x2 (THead (Bind Abst) x3 +x4))).(\lambda (H19: (pr2 c t2 x3)).(\lambda (H20: ((\forall (b: B).(\forall +(u: T).(pr2 (CHead c (Bind b) u) x0 x4))))).(let H21 \def (eq_ind T x2 +(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) +(THead (Flat Appl) x1 t0)) \to (\forall (P: Prop).P))) H16 (THead (Bind Abst) +x3 x4) H18) in (eq_ind_r T (THead (Bind Abst) x3 x4) (\lambda (t0: T).(sn3 c +(THead (Flat Appl) x1 t0))) (let H_x \def (term_dec t2 x3) in (let H22 \def +H_x in (or_ind (eq T t2 x3) ((eq T t2 x3) \to (\forall (P: Prop).P)) (sn3 c +(THead (Flat Appl) x1 (THead (Bind Abst) x3 x4))) (\lambda (H23: (eq T t2 +x3)).(let H24 \def (eq_ind_r T x3 (\lambda (t0: T).((eq T (THead (Flat Appl) +x (THead (Bind Abst) t2 x0)) (THead (Flat Appl) x1 (THead (Bind Abst) t0 +x4))) \to (\forall (P: Prop).P))) H21 t2 H23) in (let H25 \def (eq_ind_r T x3 +(\lambda (t0: T).(pr2 c t2 t0)) H19 t2 H23) in (eq_ind T t2 (\lambda (t0: +T).(sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) t0 x4)))) (let H_x0 \def +(term_dec x x1) in (let H26 \def H_x0 in (or_ind (eq T x x1) ((eq T x x1) \to +(\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) t2 +x4))) (\lambda (H27: (eq T x x1)).(let H28 \def (eq_ind_r T x1 (\lambda (t0: +T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) (THead (Flat Appl) +t0 (THead (Bind Abst) t2 x4))) \to (\forall (P: Prop).P))) H24 x H27) in (let +H29 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H14 x H27) in (eq_ind +T x (\lambda (t0: T).(sn3 c (THead (Flat Appl) t0 (THead (Bind Abst) t2 +x4)))) (let H_x1 \def (term_dec x0 x4) in (let H30 \def H_x1 in (or_ind (eq T +x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x +(THead (Bind Abst) t2 x4))) (\lambda (H31: (eq T x0 x4)).(let H32 \def +(eq_ind_r T x4 (\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind +Abst) t2 x0)) (THead (Flat Appl) x (THead (Bind Abst) t2 t0))) \to (\forall +(P: Prop).P))) H28 x0 H31) in (let H33 \def (eq_ind_r T x4 (\lambda (t0: +T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 +H31) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Flat Appl) x (THead +(Bind Abst) t2 t0)))) (H32 (refl_equal T (THead (Flat Appl) x (THead (Bind +Abst) t2 x0))) (sn3 c (THead (Flat Appl) x (THead (Bind Abst) t2 x0)))) x4 +H31)))) (\lambda (H31: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H5 (THead +(Bind Abbr) x x4) (\lambda (H32: (eq T (THead (Bind Abbr) x x0) (THead (Bind +Abbr) x x4))).(\lambda (P: Prop).(let H33 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | +(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind +Abbr) x x0) (THead (Bind Abbr) x x4) H32) in (let H34 \def (eq_ind_r T x4 +(\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H31 x0 H33) in +(let H35 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: +T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H33) in (H34 (refl_equal T x0) +P)))))) (pr3_pr2 c (THead (Bind Abbr) x x0) (THead (Bind Abbr) x x4) +(pr2_head_2 c x x0 x4 (Bind Abbr) (H20 Abbr x))) x x4 (refl_equal T (THead +(Bind Abbr) x x4)) t2 (sn3_sing c t2 H7))) H30))) x1 H27)))) (\lambda (H27: +(((eq T x x1) \to (\forall (P: Prop).P)))).(H5 (THead (Bind Abbr) x1 x4) +(\lambda (H28: (eq T (THead (Bind Abbr) x x0) (THead (Bind Abbr) x1 +x4))).(\lambda (P: Prop).(let H29 \def (f_equal T T (\lambda (e: T).(match e +in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) +\Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abbr) x x0) +(THead (Bind Abbr) x1 x4) H28) in ((let H30 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | +(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind +Abbr) x x0) (THead (Bind Abbr) x1 x4) H28) in (\lambda (H31: (eq T x +x1)).(let H32 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall +(u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H30) in (let H33 \def +(eq_ind_r T x1 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) +H27 x H31) in (let H34 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H14 +x H31) in (H33 (refl_equal T x) P)))))) H29)))) (pr3_head_12 c x x1 (pr3_pr2 +c x x1 H14) (Bind Abbr) x0 x4 (pr3_pr2 (CHead c (Bind Abbr) x1) x0 x4 (H20 +Abbr x1))) x1 x4 (refl_equal T (THead (Bind Abbr) x1 x4)) t2 (sn3_sing c t2 +H7))) H26))) x3 H23)))) (\lambda (H23: (((eq T t2 x3) \to (\forall (P: +Prop).P)))).(let H_x0 \def (term_dec x x1) in (let H24 \def H_x0 in (or_ind +(eq T x x1) ((eq T x x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) +x1 (THead (Bind Abst) x3 x4))) (\lambda (H25: (eq T x x1)).(let H26 \def +(eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H14 x H25) in (eq_ind T x +(\lambda (t0: T).(sn3 c (THead (Flat Appl) t0 (THead (Bind Abst) x3 x4)))) +(let H_x1 \def (term_dec x0 x4) in (let H27 \def H_x1 in (or_ind (eq T x0 x4) +((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x (THead +(Bind Abst) x3 x4))) (\lambda (H28: (eq T x0 x4)).(let H29 \def (eq_ind_r T +x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +x0 t0)))) H20 x0 H28) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Flat +Appl) x (THead (Bind Abst) x3 t0)))) (H8 x3 H23 (pr3_pr2 c t2 x3 H19)) x4 +H28))) (\lambda (H28: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H5 (THead +(Bind Abbr) x x4) (\lambda (H29: (eq T (THead (Bind Abbr) x x0) (THead (Bind +Abbr) x x4))).(\lambda (P: Prop).(let H30 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | +(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind +Abbr) x x0) (THead (Bind Abbr) x x4) H29) in (let H31 \def (eq_ind_r T x4 +(\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H28 x0 H30) in +(let H32 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: +T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H30) in (H31 (refl_equal T x0) +P)))))) (pr3_pr2 c (THead (Bind Abbr) x x0) (THead (Bind Abbr) x x4) +(pr2_head_2 c x x0 x4 (Bind Abbr) (H20 Abbr x))) x x4 (refl_equal T (THead +(Bind Abbr) x x4)) x3 (H7 x3 H23 (pr3_pr2 c t2 x3 H19)))) H27))) x1 H25))) +(\lambda (H25: (((eq T x x1) \to (\forall (P: Prop).P)))).(H5 (THead (Bind +Abbr) x1 x4) (\lambda (H26: (eq T (THead (Bind Abbr) x x0) (THead (Bind Abbr) +x1 x4))).(\lambda (P: Prop).(let H27 \def (f_equal T T (\lambda (e: T).(match +e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) +\Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abbr) x x0) +(THead (Bind Abbr) x1 x4) H26) in ((let H28 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | +(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind +Abbr) x x0) (THead (Bind Abbr) x1 x4) H26) in (\lambda (H29: (eq T x +x1)).(let H30 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall +(u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H28) in (let H31 \def +(eq_ind_r T x1 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) +H25 x H29) in (let H32 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H14 +x H29) in (H31 (refl_equal T x) P)))))) H27)))) (pr3_head_12 c x x1 (pr3_pr2 +c x x1 H14) (Bind Abbr) x0 x4 (pr3_pr2 (CHead c (Bind Abbr) x1) x0 x4 (H20 +Abbr x1))) x1 x4 (refl_equal T (THead (Bind Abbr) x1 x4)) x3 (H7 x3 H23 +(pr3_pr2 c t2 x3 H19)))) H24)))) H22))) x2 H18))))))) H17)) t3 H13))))))) +H12)) (\lambda (H12: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))))).(ex4_4_ind T T T +T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind Abst) t2 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind +Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +z1 t4))))))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (x4: T).(\lambda (H13: (eq T (THead (Bind Abst) t2 x0) (THead +(Bind Abst) x1 x2))).(\lambda (H14: (eq T t3 (THead (Bind Abbr) x3 +x4))).(\lambda (H15: (pr2 c x x3)).(\lambda (H16: ((\forall (b: B).(\forall +(u: T).(pr2 (CHead c (Bind b) u) x2 x4))))).(let H17 \def (eq_ind T t3 +(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) +\to (\forall (P: Prop).P))) H9 (THead (Bind Abbr) x3 x4) H14) in (eq_ind_r T +(THead (Bind Abbr) x3 x4) (\lambda (t0: T).(sn3 c t0)) (let H18 \def (f_equal +T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) +\Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ t0 _) \Rightarrow t0])) +(THead (Bind Abst) t2 x0) (THead (Bind Abst) x1 x2) H13) in ((let H19 \def +(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with +[(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t0) +\Rightarrow t0])) (THead (Bind Abst) t2 x0) (THead (Bind Abst) x1 x2) H13) in +(\lambda (_: (eq T t2 x1)).(let H21 \def (eq_ind_r T x2 (\lambda (t0: +T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t0 x4)))) H16 x0 +H19) in (let H_x \def (term_dec x x3) in (let H22 \def H_x in (or_ind (eq T x +x3) ((eq T x x3) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind Abbr) x3 x4)) +(\lambda (H23: (eq T x x3)).(let H24 \def (eq_ind_r T x3 (\lambda (t0: +T).(pr2 c x t0)) H15 x H23) in (eq_ind T x (\lambda (t0: T).(sn3 c (THead +(Bind Abbr) t0 x4))) (let H_x0 \def (term_dec x0 x4) in (let H25 \def H_x0 in +(or_ind (eq T x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead +(Bind Abbr) x x4)) (\lambda (H26: (eq T x0 x4)).(let H27 \def (eq_ind_r T x4 +(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 +t0)))) H21 x0 H26) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Bind Abbr) +x t0))) (sn3_sing c (THead (Bind Abbr) x x0) H6) x4 H26))) (\lambda (H26: +(((eq T x0 x4) \to (\forall (P: Prop).P)))).(H6 (THead (Bind Abbr) x x4) +(\lambda (H27: (eq T (THead (Bind Abbr) x x0) (THead (Bind Abbr) x +x4))).(\lambda (P: Prop).(let H28 \def (f_equal T T (\lambda (e: T).(match e +in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) +\Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) +(THead (Bind Abbr) x x4) H27) in (let H29 \def (eq_ind_r T x4 (\lambda (t0: +T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H26 x0 H28) in (let H30 \def +(eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c +(Bind b) u) x0 t0)))) H21 x0 H28) in (H29 (refl_equal T x0) P)))))) (pr3_pr2 +c (THead (Bind Abbr) x x0) (THead (Bind Abbr) x x4) (pr2_head_2 c x x0 x4 +(Bind Abbr) (H21 Abbr x))))) H25))) x3 H23))) (\lambda (H23: (((eq T x x3) +\to (\forall (P: Prop).P)))).(H6 (THead (Bind Abbr) x3 x4) (\lambda (H24: (eq +T (THead (Bind Abbr) x x0) (THead (Bind Abbr) x3 x4))).(\lambda (P: +Prop).(let H25 \def (f_equal T T (\lambda (e: T).(match e in T return +(\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | +(THead _ t0 _) \Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) +x3 x4) H24) in ((let H26 \def (f_equal T T (\lambda (e: T).(match e in T +return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) +\Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) +(THead (Bind Abbr) x3 x4) H24) in (\lambda (H27: (eq T x x3)).(let H28 \def +(eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c +(Bind b) u) x0 t0)))) H21 x0 H26) in (let H29 \def (eq_ind_r T x3 (\lambda +(t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) H23 x H27) in (let H30 +\def (eq_ind_r T x3 (\lambda (t0: T).(pr2 c x t0)) H15 x H27) in (H29 +(refl_equal T x) P)))))) H25)))) (pr3_head_12 c x x3 (pr3_pr2 c x x3 H15) +(Bind Abbr) x0 x4 (pr3_pr2 (CHead c (Bind Abbr) x3) x0 x4 (H21 Abbr x3))))) +H22)))))) H18)) t3 H14)))))))))) H12)) (\lambda (H12: (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind Abst) t2 x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) +y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t3) +(\lambda (x1: B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda +(x5: T).(\lambda (x6: T).(\lambda (H13: (not (eq B x1 Abst))).(\lambda (H14: +(eq T (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3))).(\lambda (H15: (eq +T t3 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda +(_: (pr2 c x x5)).(\lambda (H17: (pr2 c x2 x6)).(\lambda (H18: (pr2 (CHead c +(Bind x1) x6) x3 x4)).(let H19 \def (eq_ind T t3 (\lambda (t0: T).((eq T +(THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) \to (\forall (P: +Prop).P))) H9 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) +H15) in (eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) +x4)) (\lambda (t0: T).(sn3 c t0)) (let H20 \def (f_equal T B (\lambda (e: +T).(match e in T return (\lambda (_: T).B) with [(TSort _) \Rightarrow Abst | +(TLRef _) \Rightarrow Abst | (THead k _ _) \Rightarrow (match k in K return +(\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow +Abst])])) (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3) H14) in ((let H21 +\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) +with [(TSort _) \Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ t0 _) +\Rightarrow t0])) (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3) H14) in +((let H22 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: +T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ +t0) \Rightarrow t0])) (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3) H14) +in (\lambda (H23: (eq T t2 x2)).(\lambda (H24: (eq B Abst x1)).(let H25 \def +(eq_ind_r T x3 (\lambda (t0: T).(pr2 (CHead c (Bind x1) x6) t0 x4)) H18 x0 +H22) in (let H26 \def (eq_ind_r T x2 (\lambda (t0: T).(pr2 c t0 x6)) H17 t2 +H23) in (let H27 \def (eq_ind_r B x1 (\lambda (b: B).(pr2 (CHead c (Bind b) +x6) x0 x4)) H25 Abst H24) in (let H28 \def (eq_ind_r B x1 (\lambda (b: +B).(not (eq B b Abst))) H13 Abst H24) in (eq_ind B Abst (\lambda (b: B).(sn3 +c (THead (Bind b) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))) (let H29 +\def (match (H28 (refl_equal B Abst)) in False return (\lambda (_: +False).(sn3 c (THead (Bind Abst) x6 (THead (Flat Appl) (lift (S O) O x5) +x4)))) with []) in H29) x1 H24)))))))) H21)) H20)) t3 H15)))))))))))))) H12)) +H11))))))))) w H4))))))))))) y H0))))) H)))). + theorem sn3_appl_lref: \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (v: T).((sn3 c v) \to (sn3 c (THead (Flat Appl) v (TLRef i))))))) @@ -261,6 +732,195 @@ False])) I (THead (Bind x0) x1 x2) H8) in (False_ind (sn3 c (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3))) H14)) t2 H9)))))))))))))) H6)) H5))))))))) v H0))))). +theorem sn3_appl_abbr: + \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) w)) \to (\forall (v: T).((sn3 c (THead (Flat Appl) v +(lift (S i) O w))) \to (sn3 c (THead (Flat Appl) v (TLRef i))))))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (v: T).(\lambda (H0: (sn3 c +(THead (Flat Appl) v (lift (S i) O w)))).(insert_eq T (THead (Flat Appl) v +(lift (S i) O w)) (\lambda (t: T).(sn3 c t)) (sn3 c (THead (Flat Appl) v +(TLRef i))) (\lambda (y: T).(\lambda (H1: (sn3 c y)).(unintro T v (\lambda +(t: T).((eq T y (THead (Flat Appl) t (lift (S i) O w))) \to (sn3 c (THead +(Flat Appl) t (TLRef i))))) (sn3_ind c (\lambda (t: T).(\forall (x: T).((eq T +t (THead (Flat Appl) x (lift (S i) O w))) \to (sn3 c (THead (Flat Appl) x +(TLRef i)))))) (\lambda (t1: T).(\lambda (H2: ((\forall (t2: T).((((eq T t1 +t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c +t2)))))).(\lambda (H3: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: +Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).((eq T t2 (THead (Flat +Appl) x (lift (S i) O w))) \to (sn3 c (THead (Flat Appl) x (TLRef +i)))))))))).(\lambda (x: T).(\lambda (H4: (eq T t1 (THead (Flat Appl) x (lift +(S i) O w)))).(let H5 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: +T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall +(x0: T).((eq T t2 (THead (Flat Appl) x0 (lift (S i) O w))) \to (sn3 c (THead +(Flat Appl) x0 (TLRef i))))))))) H3 (THead (Flat Appl) x (lift (S i) O w)) +H4) in (let H6 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t +t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H2 +(THead (Flat Appl) x (lift (S i) O w)) H4) in (sn3_pr2_intro c (THead (Flat +Appl) x (TLRef i)) (\lambda (t2: T).(\lambda (H7: (((eq T (THead (Flat Appl) +x (TLRef i)) t2) \to (\forall (P: Prop).P)))).(\lambda (H8: (pr2 c (THead +(Flat Appl) x (TLRef i)) t2)).(let H9 \def (pr2_gen_appl c x (TLRef i) t2 H8) +in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) +(\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: +T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq +T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) +(sn3 c t2) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x +u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3))))).(ex3_2_ind T +T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: +T).(pr2 c (TLRef i) t3))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H12: (pr2 c +x x0)).(\lambda (H13: (pr2 c (TLRef i) x1)).(let H14 \def (eq_ind T t2 +(\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) t) \to (\forall (P: +Prop).P))) H7 (THead (Flat Appl) x0 x1) H11) in (eq_ind_r T (THead (Flat +Appl) x0 x1) (\lambda (t: T).(sn3 c t)) (let H15 \def (pr2_gen_lref c x1 i +H13) in (or_ind (eq T x1 (TLRef i)) (ex2_2 C T (\lambda (d0: C).(\lambda (u: +T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq +T x1 (lift (S i) O u))))) (sn3 c (THead (Flat Appl) x0 x1)) (\lambda (H16: +(eq T x1 (TLRef i))).(let H17 \def (eq_ind T x1 (\lambda (t: T).((eq T (THead +(Flat Appl) x (TLRef i)) (THead (Flat Appl) x0 t)) \to (\forall (P: +Prop).P))) H14 (TLRef i) H16) in (eq_ind_r T (TLRef i) (\lambda (t: T).(sn3 c +(THead (Flat Appl) x0 t))) (let H_x \def (term_dec x x0) in (let H18 \def H_x +in (or_ind (eq T x x0) ((eq T x x0) \to (\forall (P: Prop).P)) (sn3 c (THead +(Flat Appl) x0 (TLRef i))) (\lambda (H19: (eq T x x0)).(let H20 \def +(eq_ind_r T x0 (\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) (THead +(Flat Appl) t (TLRef i))) \to (\forall (P: Prop).P))) H17 x H19) in (let H21 +\def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x H19) in (eq_ind T x +(\lambda (t: T).(sn3 c (THead (Flat Appl) t (TLRef i)))) (H20 (refl_equal T +(THead (Flat Appl) x (TLRef i))) (sn3 c (THead (Flat Appl) x (TLRef i)))) x0 +H19)))) (\lambda (H19: (((eq T x x0) \to (\forall (P: Prop).P)))).(H5 (THead +(Flat Appl) x0 (lift (S i) O w)) (\lambda (H20: (eq T (THead (Flat Appl) x +(lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O w)))).(\lambda (P: +Prop).(let H21 \def (f_equal T T (\lambda (e: T).(match e in T return +(\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | +(THead _ t _) \Rightarrow t])) (THead (Flat Appl) x (lift (S i) O w)) (THead +(Flat Appl) x0 (lift (S i) O w)) H20) in (let H22 \def (eq_ind_r T x0 +(\lambda (t: T).((eq T x t) \to (\forall (P0: Prop).P0))) H19 x H21) in (let +H23 \def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x H21) in (H22 +(refl_equal T x) P)))))) (pr3_pr2 c (THead (Flat Appl) x (lift (S i) O w)) +(THead (Flat Appl) x0 (lift (S i) O w)) (pr2_head_1 c x x0 H12 (Flat Appl) +(lift (S i) O w))) x0 (refl_equal T (THead (Flat Appl) x0 (lift (S i) O +w))))) H18))) x1 H16))) (\lambda (H16: (ex2_2 C T (\lambda (d0: C).(\lambda +(u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(eq T x1 (lift (S i) O u)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda +(u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(eq T x1 (lift (S i) O u)))) (sn3 c (THead (Flat Appl) x0 x1)) (\lambda +(x2: C).(\lambda (x3: T).(\lambda (H17: (getl i c (CHead x2 (Bind Abbr) +x3))).(\lambda (H18: (eq T x1 (lift (S i) O x3))).(let H19 \def (eq_ind T x1 +(\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) (THead (Flat Appl) x0 +t)) \to (\forall (P: Prop).P))) H14 (lift (S i) O x3) H18) in (eq_ind_r T +(lift (S i) O x3) (\lambda (t: T).(sn3 c (THead (Flat Appl) x0 t))) (let H20 +\def (eq_ind C (CHead d (Bind Abbr) w) (\lambda (c0: C).(getl i c c0)) H +(CHead x2 (Bind Abbr) x3) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x2 +(Bind Abbr) x3) H17)) in (let H21 \def (f_equal C C (\lambda (e: C).(match e +in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c0 _ _) +\Rightarrow c0])) (CHead d (Bind Abbr) w) (CHead x2 (Bind Abbr) x3) +(getl_mono c (CHead d (Bind Abbr) w) i H (CHead x2 (Bind Abbr) x3) H17)) in +((let H22 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: +C).T) with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d +(Bind Abbr) w) (CHead x2 (Bind Abbr) x3) (getl_mono c (CHead d (Bind Abbr) w) +i H (CHead x2 (Bind Abbr) x3) H17)) in (\lambda (H23: (eq C d x2)).(let H24 +\def (eq_ind_r T x3 (\lambda (t: T).(getl i c (CHead x2 (Bind Abbr) t))) H20 +w H22) in (eq_ind T w (\lambda (t: T).(sn3 c (THead (Flat Appl) x0 (lift (S +i) O t)))) (let H25 \def (eq_ind_r C x2 (\lambda (c0: C).(getl i c (CHead c0 +(Bind Abbr) w))) H24 d H23) in (let H_x \def (term_dec x x0) in (let H26 \def +H_x in (or_ind (eq T x x0) ((eq T x x0) \to (\forall (P: Prop).P)) (sn3 c +(THead (Flat Appl) x0 (lift (S i) O w))) (\lambda (H27: (eq T x x0)).(let H28 +\def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x H27) in (eq_ind T x +(\lambda (t: T).(sn3 c (THead (Flat Appl) t (lift (S i) O w)))) (sn3_sing c +(THead (Flat Appl) x (lift (S i) O w)) H6) x0 H27))) (\lambda (H27: (((eq T x +x0) \to (\forall (P: Prop).P)))).(H6 (THead (Flat Appl) x0 (lift (S i) O w)) +(\lambda (H28: (eq T (THead (Flat Appl) x (lift (S i) O w)) (THead (Flat +Appl) x0 (lift (S i) O w)))).(\lambda (P: Prop).(let H29 \def (f_equal T T +(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) +\Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) +(THead (Flat Appl) x (lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O +w)) H28) in (let H30 \def (eq_ind_r T x0 (\lambda (t: T).((eq T x t) \to +(\forall (P0: Prop).P0))) H27 x H29) in (let H31 \def (eq_ind_r T x0 (\lambda +(t: T).(pr2 c x t)) H12 x H29) in (H30 (refl_equal T x) P)))))) (pr3_pr2 c +(THead (Flat Appl) x (lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O +w)) (pr2_head_1 c x x0 H12 (Flat Appl) (lift (S i) O w))))) H26)))) x3 +H22)))) H21))) x1 H18)))))) H16)) H15)) t2 H11))))))) H10)) (\lambda (H10: +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 +t3))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind +b) u) z1 t3))))))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: +T).(\lambda (x3: T).(\lambda (H11: (eq T (TLRef i) (THead (Bind Abst) x0 +x1))).(\lambda (H12: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 c +x x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) +u) x1 x3))))).(let H15 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat +Appl) x (TLRef i)) t) \to (\forall (P: Prop).P))) H7 (THead (Bind Abbr) x2 +x3) H12) in (eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(sn3 c t)) +(let H16 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee in T return +(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) x0 +x1) H11) in (False_ind (sn3 c (THead (Bind Abbr) x2 x3)) H16)) t2 +H12)))))))))) H10)) (\lambda (H10: (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind +B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq +T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) +(sn3 c t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 +Abst))).(\lambda (H12: (eq T (TLRef i) (THead (Bind x0) x1 x2))).(\lambda +(H13: (eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) +x3)))).(\lambda (_: (pr2 c x x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: +(pr2 (CHead c (Bind x0) x5) x2 x3)).(let H17 \def (eq_ind T t2 (\lambda (t: +T).((eq T (THead (Flat Appl) x (TLRef i)) t) \to (\forall (P: Prop).P))) H7 +(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) H13) in +(eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) +(\lambda (t: T).(sn3 c t)) (let H18 \def (eq_ind T (TLRef i) (\lambda (ee: +T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I +(THead (Bind x0) x1 x2) H12) in (False_ind (sn3 c (THead (Bind x0) x5 (THead +(Flat Appl) (lift (S O) O x4) x3))) H18)) t2 H13)))))))))))))) H10)) +H9))))))))))))) y H1)))) H0))))))). + theorem sn3_appl_cast: \forall (c: C).(\forall (v: T).(\forall (u: T).((sn3 c (THead (Flat Appl) v u)) \to (\forall (t: T).((sn3 c (THead (Flat Appl) v t)) \to (sn3 c (THead @@ -523,6 +1183,451 @@ H18) in (False_ind (sn3 c (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5))) H24)) t2 H19)))))))))))))) H16)) H15))))))))))))))) y0 H5)))) H4))))))))) y H0))))) H)))). +theorem sn3_appl_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u: +T).((sn3 c u) \to (\forall (t: T).(\forall (v: T).((sn3 (CHead c (Bind b) u) +(THead (Flat Appl) (lift (S O) O v) t)) \to (sn3 c (THead (Flat Appl) v +(THead (Bind b) u t)))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (c: C).(\lambda +(u: T).(\lambda (H0: (sn3 c u)).(sn3_ind c (\lambda (t: T).(\forall (t0: +T).(\forall (v: T).((sn3 (CHead c (Bind b) t) (THead (Flat Appl) (lift (S O) +O v) t0)) \to (sn3 c (THead (Flat Appl) v (THead (Bind b) t t0))))))) +(\lambda (t1: T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall +(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall +(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to +(\forall (t: T).(\forall (v: T).((sn3 (CHead c (Bind b) t2) (THead (Flat +Appl) (lift (S O) O v) t)) \to (sn3 c (THead (Flat Appl) v (THead (Bind b) t2 +t))))))))))).(\lambda (t: T).(\lambda (v: T).(\lambda (H3: (sn3 (CHead c +(Bind b) t1) (THead (Flat Appl) (lift (S O) O v) t))).(insert_eq T (THead +(Flat Appl) (lift (S O) O v) t) (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) +t0)) (sn3 c (THead (Flat Appl) v (THead (Bind b) t1 t))) (\lambda (y: +T).(\lambda (H4: (sn3 (CHead c (Bind b) t1) y)).(unintro T t (\lambda (t0: +T).((eq T y (THead (Flat Appl) (lift (S O) O v) t0)) \to (sn3 c (THead (Flat +Appl) v (THead (Bind b) t1 t0))))) (unintro T v (\lambda (t0: T).(\forall (x: +T).((eq T y (THead (Flat Appl) (lift (S O) O t0) x)) \to (sn3 c (THead (Flat +Appl) t0 (THead (Bind b) t1 x)))))) (sn3_ind (CHead c (Bind b) t1) (\lambda +(t0: T).(\forall (x: T).(\forall (x0: T).((eq T t0 (THead (Flat Appl) (lift +(S O) O x) x0)) \to (sn3 c (THead (Flat Appl) x (THead (Bind b) t1 x0))))))) +(\lambda (t2: T).(\lambda (H5: ((\forall (t3: T).((((eq T t2 t3) \to (\forall +(P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 (CHead c (Bind +b) t1) t3)))))).(\lambda (H6: ((\forall (t3: T).((((eq T t2 t3) \to (\forall +(P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (\forall (x: +T).(\forall (x0: T).((eq T t3 (THead (Flat Appl) (lift (S O) O x) x0)) \to +(sn3 c (THead (Flat Appl) x (THead (Bind b) t1 x0))))))))))).(\lambda (x: +T).(\lambda (x0: T).(\lambda (H7: (eq T t2 (THead (Flat Appl) (lift (S O) O +x) x0))).(let H8 \def (eq_ind T t2 (\lambda (t0: T).(\forall (t3: T).((((eq T +t0 t3) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t0 t3) \to +(\forall (x1: T).(\forall (x2: T).((eq T t3 (THead (Flat Appl) (lift (S O) O +x1) x2)) \to (sn3 c (THead (Flat Appl) x1 (THead (Bind b) t1 x2)))))))))) H6 +(THead (Flat Appl) (lift (S O) O x) x0) H7) in (let H9 \def (eq_ind T t2 +(\lambda (t0: T).(\forall (t3: T).((((eq T t0 t3) \to (\forall (P: Prop).P))) +\to ((pr3 (CHead c (Bind b) t1) t0 t3) \to (sn3 (CHead c (Bind b) t1) t3))))) +H5 (THead (Flat Appl) (lift (S O) O x) x0) H7) in (sn3_pr2_intro c (THead +(Flat Appl) x (THead (Bind b) t1 x0)) (\lambda (t3: T).(\lambda (H10: (((eq T +(THead (Flat Appl) x (THead (Bind b) t1 x0)) t3) \to (\forall (P: +Prop).P)))).(\lambda (H11: (pr2 c (THead (Flat Appl) x (THead (Bind b) t1 +x0)) t3)).(let H12 \def (pr2_gen_appl c x (THead (Bind b) t1 x0) t3 H11) in +(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat +Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: +T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) t4)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind b) t1 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind +Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t4: T).(\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) +u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead +(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind +b0) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b0) y2) z1 z2)))))))) (sn3 c t3) +(\lambda (H13: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) +(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) +t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) +(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) t4))) (sn3 c +t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H14: (eq T t3 (THead (Flat +Appl) x1 x2))).(\lambda (H15: (pr2 c x x1)).(\lambda (H16: (pr2 c (THead +(Bind b) t1 x0) x2)).(let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T +(THead (Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) +H10 (THead (Flat Appl) x1 x2) H14) in (eq_ind_r T (THead (Flat Appl) x1 x2) +(\lambda (t0: T).(sn3 c t0)) (let H_x \def (pr3_gen_bind b H c t1 x0 x2) in +(let H18 \def (H_x (pr3_pr2 c (THead (Bind b) t1 x0) x2 H16)) in (or_ind +(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 +t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: +T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) x0 t4)))) (pr3 (CHead c (Bind +b) t1) x0 (lift (S O) O x2)) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (H19: +(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 +t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: +T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) x0 t4))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 t4)))) (\lambda +(u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 +(CHead c (Bind b) t1) x0 t4))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda +(x3: T).(\lambda (x4: T).(\lambda (H20: (eq T x2 (THead (Bind b) x3 +x4))).(\lambda (H21: (pr3 c t1 x3)).(\lambda (H22: (pr3 (CHead c (Bind b) t1) +x0 x4)).(let H23 \def (eq_ind T x2 (\lambda (t0: T).((eq T (THead (Flat Appl) +x (THead (Bind b) t1 x0)) (THead (Flat Appl) x1 t0)) \to (\forall (P: +Prop).P))) H17 (THead (Bind b) x3 x4) H20) in (eq_ind_r T (THead (Bind b) x3 +x4) (\lambda (t0: T).(sn3 c (THead (Flat Appl) x1 t0))) (let H_x0 \def +(term_dec t1 x3) in (let H24 \def H_x0 in (or_ind (eq T t1 x3) ((eq T t1 x3) +\to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Bind b) x3 +x4))) (\lambda (H25: (eq T t1 x3)).(let H26 \def (eq_ind_r T x3 (\lambda (t0: +T).((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) (THead (Flat Appl) x1 +(THead (Bind b) t0 x4))) \to (\forall (P: Prop).P))) H23 t1 H25) in (let H27 +\def (eq_ind_r T x3 (\lambda (t0: T).(pr3 c t1 t0)) H21 t1 H25) in (eq_ind T +t1 (\lambda (t0: T).(sn3 c (THead (Flat Appl) x1 (THead (Bind b) t0 x4)))) +(let H_x1 \def (term_dec x0 x4) in (let H28 \def H_x1 in (or_ind (eq T x0 x4) +((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead +(Bind b) t1 x4))) (\lambda (H29: (eq T x0 x4)).(let H30 \def (eq_ind_r T x4 +(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) (THead +(Flat Appl) x1 (THead (Bind b) t1 t0))) \to (\forall (P: Prop).P))) H26 x0 +H29) in (let H31 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 (CHead c (Bind b) +t1) x0 t0)) H22 x0 H29) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Flat +Appl) x1 (THead (Bind b) t1 t0)))) (let H_x2 \def (term_dec x x1) in (let H32 +\def H_x2 in (or_ind (eq T x x1) ((eq T x x1) \to (\forall (P: Prop).P)) (sn3 +c (THead (Flat Appl) x1 (THead (Bind b) t1 x0))) (\lambda (H33: (eq T x +x1)).(let H34 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T (THead (Flat Appl) +x (THead (Bind b) t1 x0)) (THead (Flat Appl) t0 (THead (Bind b) t1 x0))) \to +(\forall (P: Prop).P))) H30 x H33) in (let H35 \def (eq_ind_r T x1 (\lambda +(t0: T).(pr2 c x t0)) H15 x H33) in (eq_ind T x (\lambda (t0: T).(sn3 c +(THead (Flat Appl) t0 (THead (Bind b) t1 x0)))) (H34 (refl_equal T (THead +(Flat Appl) x (THead (Bind b) t1 x0))) (sn3 c (THead (Flat Appl) x (THead +(Bind b) t1 x0)))) x1 H33)))) (\lambda (H33: (((eq T x x1) \to (\forall (P: +Prop).P)))).(H8 (THead (Flat Appl) (lift (S O) O x1) x0) (\lambda (H34: (eq T +(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) +x0))).(\lambda (P: Prop).(let H35 \def (f_equal T T (\lambda (e: T).(match e +in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map +(f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) +\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with +[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) +\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in +lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow +((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match +t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef +(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | +(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) +t4))]) in lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) +\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) +(lift (S O) O x1) x0) H34) in (let H36 \def (eq_ind_r T x1 (\lambda (t0: +T).((eq T x t0) \to (\forall (P0: Prop).P0))) H33 x (lift_inj x x1 (S O) O +H35)) in (let H37 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x +(lift_inj x x1 (S O) O H35)) in (H36 (refl_equal T x) P)))))) (pr3_flat +(CHead c (Bind b) t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift (CHead c +(Bind b) t1) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x x1 +(pr3_pr2 c x x1 H15)) x0 x0 (pr3_refl (CHead c (Bind b) t1) x0) Appl) x1 x0 +(refl_equal T (THead (Flat Appl) (lift (S O) O x1) x0)))) H32))) x4 H29)))) +(\lambda (H29: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H8 (THead (Flat +Appl) (lift (S O) O x1) x4) (\lambda (H30: (eq T (THead (Flat Appl) (lift (S +O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) x4))).(\lambda (P: +Prop).(let H31 \def (f_equal T T (\lambda (e: T).(match e in T return +(\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat +\to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) +\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with +[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) +\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in +lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow +((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match +t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef +(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | +(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) +t4))]) in lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) +\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) +(lift (S O) O x1) x4) H30) in ((let H32 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | +(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat +Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) x4) H30) in +(\lambda (H33: (eq T (lift (S O) O x) (lift (S O) O x1))).(let H34 \def +(eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) +H29 x0 H32) in (let H35 \def (eq_ind_r T x4 (\lambda (t0: T).((eq T (THead +(Flat Appl) x (THead (Bind b) t1 x0)) (THead (Flat Appl) x1 (THead (Bind b) +t1 t0))) \to (\forall (P0: Prop).P0))) H26 x0 H32) in (let H36 \def (eq_ind_r +T x4 (\lambda (t0: T).(pr3 (CHead c (Bind b) t1) x0 t0)) H22 x0 H32) in (let +H37 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T (THead (Flat Appl) x (THead +(Bind b) t1 x0)) (THead (Flat Appl) t0 (THead (Bind b) t1 x0))) \to (\forall +(P0: Prop).P0))) H35 x (lift_inj x x1 (S O) O H33)) in (let H38 \def +(eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) O +H33)) in (H34 (refl_equal T x0) P)))))))) H31)))) (pr3_flat (CHead c (Bind b) +t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift (CHead c (Bind b) t1) c (S +O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) +x0 x4 H22 Appl) x1 x4 (refl_equal T (THead (Flat Appl) (lift (S O) O x1) +x4)))) H28))) x3 H25)))) (\lambda (H25: (((eq T t1 x3) \to (\forall (P: +Prop).P)))).(H2 x3 H25 H21 x4 x1 (sn3_cpr3_trans c t1 x3 H21 (Bind b) (THead +(Flat Appl) (lift (S O) O x1) x4) (let H_x1 \def (term_dec x0 x4) in (let H26 +\def H_x1 in (or_ind (eq T x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) +(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x1) x4)) (\lambda +(H27: (eq T x0 x4)).(let H28 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 (CHead +c (Bind b) t1) x0 t0)) H22 x0 H27) in (eq_ind T x0 (\lambda (t0: T).(sn3 +(CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x1) t0))) (let H_x2 +\def (term_dec x x1) in (let H29 \def H_x2 in (or_ind (eq T x x1) ((eq T x +x1) \to (\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) (THead (Flat Appl) +(lift (S O) O x1) x0)) (\lambda (H30: (eq T x x1)).(let H31 \def (eq_ind_r T +x1 (\lambda (t0: T).(pr2 c x t0)) H15 x H30) in (eq_ind T x (\lambda (t0: +T).(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O t0) x0))) +(sn3_sing (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x) x0) H9) +x1 H30))) (\lambda (H30: (((eq T x x1) \to (\forall (P: Prop).P)))).(H9 +(THead (Flat Appl) (lift (S O) O x1) x0) (\lambda (H31: (eq T (THead (Flat +Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) +x0))).(\lambda (P: Prop).(let H32 \def (f_equal T T (\lambda (e: T).(match e +in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map +(f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) +\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with +[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) +\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in +lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow +((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match +t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef +(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | +(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) +t4))]) in lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) +\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) +(lift (S O) O x1) x0) H31) in (let H33 \def (eq_ind_r T x1 (\lambda (t0: +T).((eq T x t0) \to (\forall (P0: Prop).P0))) H30 x (lift_inj x x1 (S O) O +H32)) in (let H34 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x +(lift_inj x x1 (S O) O H32)) in (H33 (refl_equal T x) P)))))) (pr3_flat +(CHead c (Bind b) t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift (CHead c +(Bind b) t1) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x x1 +(pr3_pr2 c x x1 H15)) x0 x0 (pr3_refl (CHead c (Bind b) t1) x0) Appl))) +H29))) x4 H27))) (\lambda (H27: (((eq T x0 x4) \to (\forall (P: +Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x1) x4) (\lambda (H28: (eq T +(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) +x4))).(\lambda (P: Prop).(let H29 \def (f_equal T T (\lambda (e: T).(match e +in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map +(f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) +\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with +[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) +\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in +lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow +((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match +t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef +(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | +(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) +t4))]) in lref_map) (\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) +\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) +(lift (S O) O x1) x4) H28) in ((let H30 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | +(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat +Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) x4) H28) in +(\lambda (H31: (eq T (lift (S O) O x) (lift (S O) O x1))).(let H32 \def +(eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) +H27 x0 H30) in (let H33 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 (CHead c +(Bind b) t1) x0 t0)) H22 x0 H30) in (let H34 \def (eq_ind_r T x1 (\lambda +(t0: T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) O H31)) in (H32 (refl_equal +T x0) P)))))) H29)))) (pr3_flat (CHead c (Bind b) t1) (lift (S O) O x) (lift +(S O) O x1) (pr3_lift (CHead c (Bind b) t1) c (S O) O (drop_drop (Bind b) O c +c (drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) x0 x4 H22 Appl))) H26)))))) +H24))) x2 H20))))))) H19)) (\lambda (H19: (pr3 (CHead c (Bind b) t1) x0 (lift +(S O) O x2))).(sn3_gen_lift (CHead c (Bind b) t1) (THead (Flat Appl) x1 x2) +(S O) O (eq_ind_r T (THead (Flat Appl) (lift (S O) O x1) (lift (S O) (s (Flat +Appl) O) x2)) (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) t0)) (sn3_pr3_trans +(CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x1) x0) (let H_x0 \def +(term_dec x x1) in (let H20 \def H_x0 in (or_ind (eq T x x1) ((eq T x x1) \to +(\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S +O) O x1) x0)) (\lambda (H21: (eq T x x1)).(let H22 \def (eq_ind_r T x1 +(\lambda (t0: T).(pr2 c x t0)) H15 x H21) in (eq_ind T x (\lambda (t0: +T).(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O t0) x0))) +(sn3_sing (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x) x0) H9) +x1 H21))) (\lambda (H21: (((eq T x x1) \to (\forall (P: Prop).P)))).(H9 +(THead (Flat Appl) (lift (S O) O x1) x0) (\lambda (H22: (eq T (THead (Flat +Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) +x0))).(\lambda (P: Prop).(let H23 \def (f_equal T T (\lambda (e: T).(match e +in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map +(f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) +\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with +[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) +\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in +lref_map) (\lambda (x3: nat).(plus x3 (S O))) O x) | (TLRef _) \Rightarrow +((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match +t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef +(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | +(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) +t4))]) in lref_map) (\lambda (x3: nat).(plus x3 (S O))) O x) | (THead _ t0 _) +\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) +(lift (S O) O x1) x0) H22) in (let H24 \def (eq_ind_r T x1 (\lambda (t0: +T).((eq T x t0) \to (\forall (P0: Prop).P0))) H21 x (lift_inj x x1 (S O) O +H23)) in (let H25 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x +(lift_inj x x1 (S O) O H23)) in (H24 (refl_equal T x) P)))))) (pr3_flat +(CHead c (Bind b) t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift (CHead c +(Bind b) t1) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x x1 +(pr3_pr2 c x x1 H15)) x0 x0 (pr3_refl (CHead c (Bind b) t1) x0) Appl))) +H20))) (THead (Flat Appl) (lift (S O) O x1) (lift (S O) O x2)) (pr3_thin_dx +(CHead c (Bind b) t1) x0 (lift (S O) O x2) H19 (lift (S O) O x1) Appl)) (lift +(S O) O (THead (Flat Appl) x1 x2)) (lift_head (Flat Appl) x1 x2 (S O) O)) c +(drop_drop (Bind b) O c c (drop_refl c) t1))) H18))) t3 H14))))))) H13)) +(\lambda (H13: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: +T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b0: B).(\forall (u0: +T).(pr2 (CHead c (Bind b0) u0) z1 t4))))))))).(ex4_4_ind T T T T (\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +b) t1 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: +T).(\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) u0) z1 t4))))))) +(sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H14: (eq T (THead (Bind b) t1 x0) (THead (Bind Abst) x1 +x2))).(\lambda (H15: (eq T t3 (THead (Bind Abbr) x3 x4))).(\lambda (_: (pr2 c +x x3)).(\lambda (H17: ((\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind +b0) u0) x2 x4))))).(let H18 \def (eq_ind T t3 (\lambda (t0: T).((eq T (THead +(Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) H10 +(THead (Bind Abbr) x3 x4) H15) in (eq_ind_r T (THead (Bind Abbr) x3 x4) +(\lambda (t0: T).(sn3 c t0)) (let H19 \def (f_equal T B (\lambda (e: +T).(match e in T return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | +(TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k in K return +(\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow +b])])) (THead (Bind b) t1 x0) (THead (Bind Abst) x1 x2) H14) in ((let H20 +\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) +with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ t0 _) +\Rightarrow t0])) (THead (Bind b) t1 x0) (THead (Bind Abst) x1 x2) H14) in +((let H21 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: +T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ +t0) \Rightarrow t0])) (THead (Bind b) t1 x0) (THead (Bind Abst) x1 x2) H14) +in (\lambda (_: (eq T t1 x1)).(\lambda (H23: (eq B b Abst)).(let H24 \def +(eq_ind_r T x2 (\lambda (t0: T).(\forall (b0: B).(\forall (u0: T).(pr2 (CHead +c (Bind b0) u0) t0 x4)))) H17 x0 H21) in (let H25 \def (eq_ind B b (\lambda +(b0: B).((eq T (THead (Flat Appl) x (THead (Bind b0) t1 x0)) (THead (Bind +Abbr) x3 x4)) \to (\forall (P: Prop).P))) H18 Abst H23) in (let H26 \def +(eq_ind B b (\lambda (b0: B).(\forall (t4: T).((((eq T (THead (Flat Appl) +(lift (S O) O x) x0) t4) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind +b0) t1) (THead (Flat Appl) (lift (S O) O x) x0) t4) \to (sn3 (CHead c (Bind +b0) t1) t4))))) H9 Abst H23) in (let H27 \def (eq_ind B b (\lambda (b0: +B).(\forall (t4: T).((((eq T (THead (Flat Appl) (lift (S O) O x) x0) t4) \to +(\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b0) t1) (THead (Flat Appl) +(lift (S O) O x) x0) t4) \to (\forall (x5: T).(\forall (x6: T).((eq T t4 +(THead (Flat Appl) (lift (S O) O x5) x6)) \to (sn3 c (THead (Flat Appl) x5 +(THead (Bind b0) t1 x6)))))))))) H8 Abst H23) in (let H28 \def (eq_ind B b +(\lambda (b0: B).(\forall (t4: T).((((eq T t1 t4) \to (\forall (P: Prop).P))) +\to ((pr3 c t1 t4) \to (\forall (t0: T).(\forall (v0: T).((sn3 (CHead c (Bind +b0) t4) (THead (Flat Appl) (lift (S O) O v0) t0)) \to (sn3 c (THead (Flat +Appl) v0 (THead (Bind b0) t4 t0)))))))))) H2 Abst H23) in (let H29 \def +(eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H Abst H23) in (let H30 +\def (match (H29 (refl_equal B Abst)) in False return (\lambda (_: +False).(sn3 c (THead (Bind Abbr) x3 x4))) with []) in H30)))))))))) H20)) +H19)) t3 H15)))))))))) H13)) (\lambda (H13: (ex6_6 B T T T T T (\lambda (b0: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) +t1 x0) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +t3 (THead (Bind b0) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b0) y2) z1 +z2))))))))).(ex6_6_ind B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 +Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead (Bind +b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b0) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b0: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c (Bind b0) y2) z1 z2))))))) (sn3 c t3) (\lambda (x1: +B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (_: (not (eq B x1 Abst))).(\lambda (H15: (eq T +(THead (Bind b) t1 x0) (THead (Bind x1) x2 x3))).(\lambda (H16: (eq T t3 +(THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda +(H17: (pr2 c x x5)).(\lambda (H18: (pr2 c x2 x6)).(\lambda (H19: (pr2 (CHead +c (Bind x1) x6) x3 x4)).(let H20 \def (eq_ind T t3 (\lambda (t0: T).((eq T +(THead (Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) +H10 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) H16) in +(eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) +(\lambda (t0: T).(sn3 c t0)) (let H21 \def (f_equal T B (\lambda (e: +T).(match e in T return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | +(TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k in K return +(\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow +b])])) (THead (Bind b) t1 x0) (THead (Bind x1) x2 x3) H15) in ((let H22 \def +(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with +[(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ t0 _) +\Rightarrow t0])) (THead (Bind b) t1 x0) (THead (Bind x1) x2 x3) H15) in +((let H23 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: +T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ +t0) \Rightarrow t0])) (THead (Bind b) t1 x0) (THead (Bind x1) x2 x3) H15) in +(\lambda (H24: (eq T t1 x2)).(\lambda (H25: (eq B b x1)).(let H26 \def +(eq_ind_r T x3 (\lambda (t0: T).(pr2 (CHead c (Bind x1) x6) t0 x4)) H19 x0 +H23) in (let H27 \def (eq_ind_r T x2 (\lambda (t0: T).(pr2 c t0 x6)) H18 t1 +H24) in (let H28 \def (eq_ind_r B x1 (\lambda (b0: B).(pr2 (CHead c (Bind b0) +x6) x0 x4)) H26 b H25) in (eq_ind B b (\lambda (b0: B).(sn3 c (THead (Bind +b0) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))) (sn3_pr3_trans c (THead +(Bind b) t1 (THead (Flat Appl) (lift (S O) O x5) x4)) (sn3_bind b c t1 +(sn3_sing c t1 H1) (THead (Flat Appl) (lift (S O) O x5) x4) (let H_x \def +(term_dec x x5) in (let H29 \def H_x in (or_ind (eq T x x5) ((eq T x x5) \to +(\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S +O) O x5) x4)) (\lambda (H30: (eq T x x5)).(let H31 \def (eq_ind_r T x5 +(\lambda (t0: T).(pr2 c x t0)) H17 x H30) in (eq_ind T x (\lambda (t0: +T).(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O t0) x4))) (let +H_x0 \def (term_dec x0 x4) in (let H32 \def H_x0 in (or_ind (eq T x0 x4) ((eq +T x0 x4) \to (\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) (THead (Flat +Appl) (lift (S O) O x) x4)) (\lambda (H33: (eq T x0 x4)).(let H34 \def +(eq_ind_r T x4 (\lambda (t0: T).(pr2 (CHead c (Bind b) x6) x0 t0)) H28 x0 +H33) in (eq_ind T x0 (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) (THead (Flat +Appl) (lift (S O) O x) t0))) (sn3_sing (CHead c (Bind b) t1) (THead (Flat +Appl) (lift (S O) O x) x0) H9) x4 H33))) (\lambda (H33: (((eq T x0 x4) \to +(\forall (P: Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x) x4) (\lambda +(H34: (eq T (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift +(S O) O x) x4))).(\lambda (P: Prop).(let H35 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | +(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat +Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x) x4) H34) in +(let H36 \def (eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: +Prop).P0))) H33 x0 H35) in (let H37 \def (eq_ind_r T x4 (\lambda (t0: T).(pr2 +(CHead c (Bind b) x6) x0 t0)) H28 x0 H35) in (H36 (refl_equal T x0) P)))))) +(pr3_pr3_pr3_t c t1 x6 (pr3_pr2 c t1 x6 H27) (THead (Flat Appl) (lift (S O) O +x) x0) (THead (Flat Appl) (lift (S O) O x) x4) (Bind b) (pr3_pr2 (CHead c +(Bind b) x6) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift +(S O) O x) x4) (pr2_thin_dx (CHead c (Bind b) x6) x0 x4 H28 (lift (S O) O x) +Appl))))) H32))) x5 H30))) (\lambda (H30: (((eq T x x5) \to (\forall (P: +Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x5) x4) (\lambda (H31: (eq T +(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x5) +x4))).(\lambda (P: Prop).(let H32 \def (f_equal T T (\lambda (e: T).(match e +in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map +(f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match t0 with [(TSort n) +\Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with +[true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u0 t4) +\Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) t4))]) in +lref_map) (\lambda (x7: nat).(plus x7 (S O))) O x) | (TLRef _) \Rightarrow +((let rec lref_map (f: ((nat \to nat))) (d: nat) (t0: T) on t0: T \def (match +t0 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef +(match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | +(THead k u0 t4) \Rightarrow (THead k (lref_map f d u0) (lref_map f (s k d) +t4))]) in lref_map) (\lambda (x7: nat).(plus x7 (S O))) O x) | (THead _ t0 _) +\Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) +(lift (S O) O x5) x4) H31) in ((let H33 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | +(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat +Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x5) x4) H31) in +(\lambda (H34: (eq T (lift (S O) O x) (lift (S O) O x5))).(let H35 \def +(eq_ind_r T x5 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) +H30 x (lift_inj x x5 (S O) O H34)) in (let H36 \def (eq_ind_r T x5 (\lambda +(t0: T).(pr2 c x t0)) H17 x (lift_inj x x5 (S O) O H34)) in (let H37 \def +(eq_ind_r T x4 (\lambda (t0: T).(pr2 (CHead c (Bind b) x6) x0 t0)) H28 x0 +H33) in (H35 (refl_equal T x) P)))))) H32)))) (pr3_pr3_pr3_t c t1 x6 (pr3_pr2 +c t1 x6 H27) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift +(S O) O x5) x4) (Bind b) (pr3_flat (CHead c (Bind b) x6) (lift (S O) O x) +(lift (S O) O x5) (pr3_lift (CHead c (Bind b) x6) c (S O) O (drop_drop (Bind +b) O c c (drop_refl c) x6) x x5 (pr3_pr2 c x x5 H17)) x0 x4 (pr3_pr2 (CHead c +(Bind b) x6) x0 x4 H28) Appl)))) H29)))) (THead (Bind b) x6 (THead (Flat +Appl) (lift (S O) O x5) x4)) (pr3_pr2 c (THead (Bind b) t1 (THead (Flat Appl) +(lift (S O) O x5) x4)) (THead (Bind b) x6 (THead (Flat Appl) (lift (S O) O +x5) x4)) (pr2_head_1 c t1 x6 H27 (Bind b) (THead (Flat Appl) (lift (S O) O +x5) x4)))) x1 H25))))))) H22)) H21)) t3 H16)))))))))))))) H13)) +H12)))))))))))))) y H4))))) H3))))))) u H0))))). + theorem sn3_appl_appl: \forall (v1: T).(\forall (t1: T).(let u1 \def (THead (Flat Appl) v1 t1) in (\forall (c: C).((sn3 c u1) \to (\forall (v2: T).((sn3 c v2) \to (((\forall @@ -991,6 +2096,26 @@ H15) in (False_ind (sn3 c (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4))) H21)) t3 H16)))))))))))))) H13)) H12)))))))))))) v2 H4))))))))) y H0))))) H))))). +theorem sn3_appl_beta: + \forall (c: C).(\forall (u: T).(\forall (v: T).(\forall (t: T).((sn3 c +(THead (Flat Appl) u (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) +\to (sn3 c (THead (Flat Appl) u (THead (Flat Appl) v (THead (Bind Abst) w +t)))))))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (v: T).(\lambda (t: T).(\lambda (H: +(sn3 c (THead (Flat Appl) u (THead (Bind Abbr) v t)))).(\lambda (w: +T).(\lambda (H0: (sn3 c w)).(let H_x \def (sn3_gen_flat Appl c u (THead (Bind +Abbr) v t) H) in (let H1 \def H_x in (and_ind (sn3 c u) (sn3 c (THead (Bind +Abbr) v t)) (sn3 c (THead (Flat Appl) u (THead (Flat Appl) v (THead (Bind +Abst) w t)))) (\lambda (H2: (sn3 c u)).(\lambda (H3: (sn3 c (THead (Bind +Abbr) v t))).(sn3_appl_appl v (THead (Bind Abst) w t) c (sn3_beta c v t H3 w +H0) u H2 (\lambda (u2: T).(\lambda (H4: (pr3 c (THead (Flat Appl) v (THead +(Bind Abst) w t)) u2)).(\lambda (H5: (((iso (THead (Flat Appl) v (THead (Bind +Abst) w t)) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat +Appl) u (THead (Bind Abbr) v t)) H (THead (Flat Appl) u u2) (pr3_thin_dx c +(THead (Bind Abbr) v t) u2 (pr3_iso_beta v w t c u2 H4 H5) u Appl)))))))) +H1))))))))). + theorem sn3_appl_appls: \forall (v1: T).(\forall (t1: T).(\forall (vs: TList).(let u1 \def (THeads (Flat Appl) (TCons v1 vs) t1) in (\forall (c: C).((sn3 c u1) \to (\forall @@ -1090,6 +2215,106 @@ Appl) (TCons t1 t2) (THead (Flat Cast) u t3)) u2)).(\lambda (H12: (((iso Appl) (TCons t1 t2) t3) u2 (pr3_iso_appls_cast c u t3 (TCons t1 t2) u2 H11 H12) t Appl))))))))) H7)))))) H3))))))))))) t0))) vs)). +theorem sn3_appls_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u: +T).((sn3 c u) \to (\forall (vs: TList).(\forall (t: T).((sn3 (CHead c (Bind +b) u) (THeads (Flat Appl) (lifts (S O) O vs) t)) \to (sn3 c (THeads (Flat +Appl) vs (THead (Bind b) u t)))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (c: C).(\lambda +(u: T).(\lambda (H0: (sn3 c u)).(\lambda (vs: TList).(TList_ind (\lambda (t: +TList).(\forall (t0: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) (lifts +(S O) O t) t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Bind b) u t0)))))) +(\lambda (t: T).(\lambda (H1: (sn3 (CHead c (Bind b) u) t)).(sn3_bind b c u +H0 t H1))) (\lambda (v: T).(\lambda (vs0: TList).(TList_ind (\lambda (t: +TList).(((\forall (t0: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) +(lifts (S O) O t) t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Bind b) u +t0)))))) \to (\forall (t0: T).((sn3 (CHead c (Bind b) u) (THead (Flat Appl) +(lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O t) t0))) \to (sn3 c +(THead (Flat Appl) v (THeads (Flat Appl) t (THead (Bind b) u t0)))))))) +(\lambda (_: ((\forall (t: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) +(lifts (S O) O TNil) t)) \to (sn3 c (THeads (Flat Appl) TNil (THead (Bind b) +u t))))))).(\lambda (t: T).(\lambda (H2: (sn3 (CHead c (Bind b) u) (THead +(Flat Appl) (lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O TNil) +t)))).(sn3_appl_bind b H c u H0 t v H2)))) (\lambda (t: T).(\lambda (t0: +TList).(\lambda (_: ((((\forall (t1: T).((sn3 (CHead c (Bind b) u) (THeads +(Flat Appl) (lifts (S O) O t0) t1)) \to (sn3 c (THeads (Flat Appl) t0 (THead +(Bind b) u t1)))))) \to (\forall (t1: T).((sn3 (CHead c (Bind b) u) (THead +(Flat Appl) (lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O t0) t1))) \to +(sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (THead (Bind b) u +t1))))))))).(\lambda (H2: ((\forall (t1: T).((sn3 (CHead c (Bind b) u) +(THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)) \to (sn3 c (THeads +(Flat Appl) (TCons t t0) (THead (Bind b) u t1))))))).(\lambda (t1: +T).(\lambda (H3: (sn3 (CHead c (Bind b) u) (THead (Flat Appl) (lift (S O) O +v) (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)))).(let H_x \def +(sn3_gen_flat Appl (CHead c (Bind b) u) (lift (S O) O v) (THeads (Flat Appl) +(lifts (S O) O (TCons t t0)) t1) H3) in (let H4 \def H_x in (and_ind (sn3 +(CHead c (Bind b) u) (lift (S O) O v)) (sn3 (CHead c (Bind b) u) (THeads +(Flat Appl) (lifts (S O) O (TCons t t0)) t1)) (sn3 c (THead (Flat Appl) v +(THeads (Flat Appl) (TCons t t0) (THead (Bind b) u t1)))) (\lambda (H5: (sn3 +(CHead c (Bind b) u) (lift (S O) O v))).(\lambda (H6: (sn3 (CHead c (Bind b) +u) (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1))).(let H_y \def +(sn3_gen_lift (CHead c (Bind b) u) v (S O) O H5 c) in (sn3_appl_appls t +(THead (Bind b) u t1) t0 c (H2 t1 H6) v (H_y (drop_drop (Bind b) O c c +(drop_refl c) u)) (\lambda (u2: T).(\lambda (H7: (pr3 c (THeads (Flat Appl) +(TCons t t0) (THead (Bind b) u t1)) u2)).(\lambda (H8: (((iso (THeads (Flat +Appl) (TCons t t0) (THead (Bind b) u t1)) u2) \to (\forall (P: +Prop).P)))).(let H9 \def (pr3_iso_appls_bind b H (TCons t t0) u t1 c u2 H7 +H8) in (sn3_pr3_trans c (THead (Flat Appl) v (THead (Bind b) u (THeads (Flat +Appl) (lifts (S O) O (TCons t t0)) t1))) (sn3_appl_bind b H c u H0 (THeads +(Flat Appl) (lifts (S O) O (TCons t t0)) t1) v H3) (THead (Flat Appl) v u2) +(pr3_flat c v v (pr3_refl c v) (THead (Bind b) u (THeads (Flat Appl) (lifts +(S O) O (TCons t t0)) t1)) u2 H9 Appl)))))))))) H4))))))))) vs0))) vs)))))). + +theorem sn3_appls_beta: + \forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (us: TList).((sn3 c +(THeads (Flat Appl) us (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c +w) \to (sn3 c (THeads (Flat Appl) us (THead (Flat Appl) v (THead (Bind Abst) +w t)))))))))) +\def + \lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (us: +TList).(TList_ind (\lambda (t0: TList).((sn3 c (THeads (Flat Appl) t0 (THead +(Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads (Flat +Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))) (\lambda (H: +(sn3 c (THead (Bind Abbr) v t))).(\lambda (w: T).(\lambda (H0: (sn3 c +w)).(sn3_beta c v t H w H0)))) (\lambda (u: T).(\lambda (us0: +TList).(TList_ind (\lambda (t0: TList).((((sn3 c (THeads (Flat Appl) t0 +(THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads +(Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))) \to ((sn3 +c (THead (Flat Appl) u (THeads (Flat Appl) t0 (THead (Bind Abbr) v t)))) \to +(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) u (THeads (Flat +Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))))) (\lambda (_: +(((sn3 c (THeads (Flat Appl) TNil (THead (Bind Abbr) v t))) \to (\forall (w: +T).((sn3 c w) \to (sn3 c (THeads (Flat Appl) TNil (THead (Flat Appl) v (THead +(Bind Abst) w t))))))))).(\lambda (H0: (sn3 c (THead (Flat Appl) u (THeads +(Flat Appl) TNil (THead (Bind Abbr) v t))))).(\lambda (w: T).(\lambda (H1: +(sn3 c w)).(sn3_appl_beta c u v t H0 w H1))))) (\lambda (t0: T).(\lambda (t1: +TList).(\lambda (_: (((((sn3 c (THeads (Flat Appl) t1 (THead (Bind Abbr) v +t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads (Flat Appl) t1 (THead +(Flat Appl) v (THead (Bind Abst) w t)))))))) \to ((sn3 c (THead (Flat Appl) u +(THeads (Flat Appl) t1 (THead (Bind Abbr) v t)))) \to (\forall (w: T).((sn3 c +w) \to (sn3 c (THead (Flat Appl) u (THeads (Flat Appl) t1 (THead (Flat Appl) +v (THead (Bind Abst) w t))))))))))).(\lambda (H0: (((sn3 c (THeads (Flat +Appl) (TCons t0 t1) (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) +\to (sn3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v (THead +(Bind Abst) w t))))))))).(\lambda (H1: (sn3 c (THead (Flat Appl) u (THeads +(Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v t))))).(\lambda (w: +T).(\lambda (H2: (sn3 c w)).(let H_x \def (sn3_gen_flat Appl c u (THeads +(Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v t)) H1) in (let H3 \def H_x in +(and_ind (sn3 c u) (sn3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Bind +Abbr) v t))) (sn3 c (THead (Flat Appl) u (THeads (Flat Appl) (TCons t0 t1) +(THead (Flat Appl) v (THead (Bind Abst) w t))))) (\lambda (H4: (sn3 c +u)).(\lambda (H5: (sn3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Bind Abbr) +v t)))).(sn3_appl_appls t0 (THead (Flat Appl) v (THead (Bind Abst) w t)) t1 c +(H0 H5 w H2) u H4 (\lambda (u2: T).(\lambda (H6: (pr3 c (THeads (Flat Appl) +(TCons t0 t1) (THead (Flat Appl) v (THead (Bind Abst) w t))) u2)).(\lambda +(H7: (((iso (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v (THead +(Bind Abst) w t))) u2) \to (\forall (P: Prop).P)))).(let H8 \def +(pr3_iso_appls_beta (TCons t0 t1) v w t c u2 H6 H7) in (sn3_pr3_trans c +(THead (Flat Appl) u (THeads (Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v +t))) H1 (THead (Flat Appl) u u2) (pr3_thin_dx c (THeads (Flat Appl) (TCons t0 +t1) (THead (Bind Abbr) v t)) u2 H8 u Appl))))))))) H3)))))))))) us0))) us)))). + theorem sn3_lift: \forall (d: C).(\forall (t: T).((sn3 d t) \to (\forall (c: C).(\forall (h: nat).(\forall (i: nat).((drop h i c d) \to (sn3 c (lift h i t)))))))) @@ -1155,6 +2380,44 @@ H10) in (eq_ind T v (\lambda (t: T).(sn3 c (lift (S i) O t))) (let H13 \def H11) in (sn3_lift d v H0 c (S i) O (getl_drop Abbr c d v i H13))) x1 H10)))) H9))) t2 H6)))))) H4)) H3))))))))))). +theorem sn3_appls_abbr: + \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) w)) \to (\forall (vs: TList).((sn3 c (THeads (Flat Appl) +vs (lift (S i) O w))) \to (sn3 c (THeads (Flat Appl) vs (TLRef i))))))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (vs: TList).(TList_ind +(\lambda (t: TList).((sn3 c (THeads (Flat Appl) t (lift (S i) O w))) \to (sn3 +c (THeads (Flat Appl) t (TLRef i))))) (\lambda (H0: (sn3 c (lift (S i) O +w))).(let H_y \def (sn3_gen_lift c w (S i) O H0 d (getl_drop Abbr c d w i H)) +in (sn3_abbr c d w i H H_y))) (\lambda (v: T).(\lambda (vs0: +TList).(TList_ind (\lambda (t: TList).((((sn3 c (THeads (Flat Appl) t (lift +(S i) O w))) \to (sn3 c (THeads (Flat Appl) t (TLRef i))))) \to ((sn3 c +(THead (Flat Appl) v (THeads (Flat Appl) t (lift (S i) O w)))) \to (sn3 c +(THead (Flat Appl) v (THeads (Flat Appl) t (TLRef i))))))) (\lambda (_: +(((sn3 c (THeads (Flat Appl) TNil (lift (S i) O w))) \to (sn3 c (THeads (Flat +Appl) TNil (TLRef i)))))).(\lambda (H1: (sn3 c (THead (Flat Appl) v (THeads +(Flat Appl) TNil (lift (S i) O w))))).(sn3_appl_abbr c d w i H v H1))) +(\lambda (t: T).(\lambda (t0: TList).(\lambda (_: (((((sn3 c (THeads (Flat +Appl) t0 (lift (S i) O w))) \to (sn3 c (THeads (Flat Appl) t0 (TLRef i))))) +\to ((sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (lift (S i) O w)))) +\to (sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (TLRef +i)))))))).(\lambda (H1: (((sn3 c (THeads (Flat Appl) (TCons t t0) (lift (S i) +O w))) \to (sn3 c (THeads (Flat Appl) (TCons t t0) (TLRef i)))))).(\lambda +(H2: (sn3 c (THead (Flat Appl) v (THeads (Flat Appl) (TCons t t0) (lift (S i) +O w))))).(let H_x \def (sn3_gen_flat Appl c v (THeads (Flat Appl) (TCons t +t0) (lift (S i) O w)) H2) in (let H3 \def H_x in (and_ind (sn3 c v) (sn3 c +(THeads (Flat Appl) (TCons t t0) (lift (S i) O w))) (sn3 c (THead (Flat Appl) +v (THeads (Flat Appl) (TCons t t0) (TLRef i)))) (\lambda (H4: (sn3 c +v)).(\lambda (H5: (sn3 c (THeads (Flat Appl) (TCons t t0) (lift (S i) O +w)))).(sn3_appl_appls t (TLRef i) t0 c (H1 H5) v H4 (\lambda (u2: T).(\lambda +(H6: (pr3 c (THeads (Flat Appl) (TCons t t0) (TLRef i)) u2)).(\lambda (H7: +(((iso (THeads (Flat Appl) (TCons t t0) (TLRef i)) u2) \to (\forall (P: +Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) v (THeads (Flat Appl) (TCons +t t0) (lift (S i) O w))) H2 (THead (Flat Appl) v u2) (pr3_thin_dx c (THeads +(Flat Appl) (TCons t t0) (lift (S i) O w)) u2 (pr3_iso_appls_abbr c d w i H +(TCons t t0) u2 H6 H7) v Appl)))))))) H3)))))))) vs0))) vs)))))). + theorem sns3_lifts: \forall (c: C).(\forall (d: C).(\forall (h: nat).(\forall (i: nat).((drop h i c d) \to (\forall (ts: TList).((sns3 d ts) \to (sns3 c (lifts h i ts)))))))) @@ -1169,3 +2432,68 @@ H1 in (and_ind (sn3 d t) (sns3 d t0) (land (sn3 c (lift h i t)) (sns3 c (sn3 c (lift h i t)) (sns3 c (lifts h i t0)) (sn3_lift d t H3 c h i H) (H0 H4)))) H2)))))) ts)))))). +theorem sn3_gen_def: + \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) v)) \to ((sn3 c (TLRef i)) \to (sn3 d v)))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (H0: (sn3 c (TLRef +i))).(sn3_gen_lift c v (S i) O (sn3_pr3_trans c (TLRef i) H0 (lift (S i) O v) +(pr3_pr2 c (TLRef i) (lift (S i) O v) (pr2_delta c d v i H (TLRef i) (TLRef +i) (pr0_refl (TLRef i)) (lift (S i) O v) (subst0_lref v i)))) d (getl_drop +Abbr c d v i H))))))). + +theorem sn3_cdelta: + \forall (v: T).(\forall (t: T).(\forall (i: nat).(((\forall (w: T).(ex T +(\lambda (u: T).(subst0 i w t u))))) \to (\forall (c: C).(\forall (d: +C).((getl i c (CHead d (Bind Abbr) v)) \to ((sn3 c t) \to (sn3 d v)))))))) +\def + \lambda (v: T).(\lambda (t: T).(\lambda (i: nat).(\lambda (H: ((\forall (w: +T).(ex T (\lambda (u: T).(subst0 i w t u)))))).(let H_x \def (H v) in (let H0 +\def H_x in (ex_ind T (\lambda (u: T).(subst0 i v t u)) (\forall (c: +C).(\forall (d: C).((getl i c (CHead d (Bind Abbr) v)) \to ((sn3 c t) \to +(sn3 d v))))) (\lambda (x: T).(\lambda (H1: (subst0 i v t x)).(subst0_ind +(\lambda (n: nat).(\lambda (t0: T).(\lambda (t1: T).(\lambda (_: T).(\forall +(c: C).(\forall (d: C).((getl n c (CHead d (Bind Abbr) t0)) \to ((sn3 c t1) +\to (sn3 d t0))))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (c: +C).(\lambda (d: C).(\lambda (H2: (getl i0 c (CHead d (Bind Abbr) +v0))).(\lambda (H3: (sn3 c (TLRef i0))).(sn3_gen_def c d v0 i0 H2 H3))))))) +(\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: +nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (H3: ((\forall (c: +C).(\forall (d: C).((getl i0 c (CHead d (Bind Abbr) v0)) \to ((sn3 c u1) \to +(sn3 d v0))))))).(\lambda (t0: T).(\lambda (k: K).(\lambda (c: C).(\lambda +(d: C).(\lambda (H4: (getl i0 c (CHead d (Bind Abbr) v0))).(\lambda (H5: (sn3 +c (THead k u1 t0))).(let H_y \def (sn3_gen_head k c u1 t0 H5) in (H3 c d H4 +H_y)))))))))))))) (\lambda (k: K).(\lambda (v0: T).(\lambda (t2: T).(\lambda +(t1: T).(\lambda (i0: nat).(\lambda (H2: (subst0 (s k i0) v0 t1 t2)).(\lambda +(H3: ((\forall (c: C).(\forall (d: C).((getl (s k i0) c (CHead d (Bind Abbr) +v0)) \to ((sn3 c t1) \to (sn3 d v0))))))).(\lambda (u: T).(\lambda (c: +C).(\lambda (d: C).(\lambda (H4: (getl i0 c (CHead d (Bind Abbr) +v0))).(\lambda (H5: (sn3 c (THead k u t1))).(K_ind (\lambda (k0: K).((subst0 +(s k0 i0) v0 t1 t2) \to (((\forall (c0: C).(\forall (d0: C).((getl (s k0 i0) +c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to (sn3 d0 v0)))))) \to ((sn3 +c (THead k0 u t1)) \to (sn3 d v0))))) (\lambda (b: B).(\lambda (_: (subst0 (s +(Bind b) i0) v0 t1 t2)).(\lambda (H7: ((\forall (c0: C).(\forall (d0: +C).((getl (s (Bind b) i0) c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to +(sn3 d0 v0))))))).(\lambda (H8: (sn3 c (THead (Bind b) u t1))).(let H_x0 \def +(sn3_gen_bind b c u t1 H8) in (let H9 \def H_x0 in (and_ind (sn3 c u) (sn3 +(CHead c (Bind b) u) t1) (sn3 d v0) (\lambda (_: (sn3 c u)).(\lambda (H11: +(sn3 (CHead c (Bind b) u) t1)).(H7 (CHead c (Bind b) u) d (getl_clear_bind b +(CHead c (Bind b) u) c u (clear_bind b c u) (CHead d (Bind Abbr) v0) i0 H4) +H11))) H9))))))) (\lambda (f: F).(\lambda (_: (subst0 (s (Flat f) i0) v0 t1 +t2)).(\lambda (H7: ((\forall (c0: C).(\forall (d0: C).((getl (s (Flat f) i0) +c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to (sn3 d0 v0))))))).(\lambda +(H8: (sn3 c (THead (Flat f) u t1))).(let H_x0 \def (sn3_gen_flat f c u t1 H8) +in (let H9 \def H_x0 in (and_ind (sn3 c u) (sn3 c t1) (sn3 d v0) (\lambda (_: +(sn3 c u)).(\lambda (H11: (sn3 c t1)).(H7 c d H4 H11))) H9))))))) k H2 H3 +H5))))))))))))) (\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda +(i0: nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (H3: ((\forall (c: +C).(\forall (d: C).((getl i0 c (CHead d (Bind Abbr) v0)) \to ((sn3 c u1) \to +(sn3 d v0))))))).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: ((\forall (c: C).(\forall (d: +C).((getl (s k i0) c (CHead d (Bind Abbr) v0)) \to ((sn3 c t1) \to (sn3 d +v0))))))).(\lambda (c: C).(\lambda (d: C).(\lambda (H6: (getl i0 c (CHead d +(Bind Abbr) v0))).(\lambda (H7: (sn3 c (THead k u1 t1))).(let H_y \def +(sn3_gen_head k c u1 t1 H7) in (H3 c d H6 H_y))))))))))))))))) i v t x H1))) +H0)))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/fwd.ma index bb669667e..ccaad15d2 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/fwd.ma @@ -20,137 +20,17 @@ include "subst0/defs.ma". include "lift/props.ma". -theorem subst0_gen_sort: +axiom subst0_gen_sort: \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 i v (TSort n) x) \to (\forall (P: Prop).P))))) -\def - \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda -(H: (subst0 i v (TSort n) x)).(\lambda (P: Prop).(let H0 \def (match H in -subst0 return (\lambda (n0: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda -(t1: T).(\lambda (_: (subst0 n0 t t0 t1)).((eq nat n0 i) \to ((eq T t v) \to -((eq T t0 (TSort n)) \to ((eq T t1 x) \to P))))))))) with [(subst0_lref v0 -i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda (H1: (eq T v0 -v)).(\lambda (H2: (eq T (TLRef i0) (TSort n))).(\lambda (H3: (eq T (lift (S -i0) O v0) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (TLRef -n0) (TSort n)) \to ((eq T (lift (S n0) O v0) x) \to P)))) (\lambda (H4: (eq T -v0 v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (TSort n)) \to ((eq T -(lift (S i) O t) x) \to P))) (\lambda (H5: (eq T (TLRef i) (TSort n))).(let -H6 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e in T return (\lambda (_: -T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (TSort n) H5) in (False_ind ((eq T (lift -(S i) O v) x) \to P) H6))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 -H2 H3))))) | (subst0_fst v0 u2 u1 i0 H0 t k) \Rightarrow (\lambda (H1: (eq -nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u1 t) -(TSort n))).(\lambda (H4: (eq T (THead k u2 t) x)).(eq_ind nat i (\lambda -(n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t) (TSort n)) \to ((eq T (THead -k u2 t) x) \to ((subst0 n0 v0 u1 u2) \to P))))) (\lambda (H5: (eq T v0 -v)).(eq_ind T v (\lambda (t0: T).((eq T (THead k u1 t) (TSort n)) \to ((eq T -(THead k u2 t) x) \to ((subst0 i t0 u1 u2) \to P)))) (\lambda (H6: (eq T -(THead k u1 t) (TSort n))).(let H7 \def (eq_ind T (THead k u1 t) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TSort n) H6) in (False_ind ((eq T (THead k u2 t) x) \to ((subst0 i v u1 u2) -\to P)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 -H0))))) | (subst0_snd k v0 t2 t1 i0 H0 u) \Rightarrow (\lambda (H1: (eq nat -i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u t1) (TSort -n))).(\lambda (H4: (eq T (THead k u t2) x)).(eq_ind nat i (\lambda (n0: -nat).((eq T v0 v) \to ((eq T (THead k u t1) (TSort n)) \to ((eq T (THead k u -t2) x) \to ((subst0 (s k n0) v0 t1 t2) \to P))))) (\lambda (H5: (eq T v0 -v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u t1) (TSort n)) \to ((eq T -(THead k u t2) x) \to ((subst0 (s k i) t t1 t2) \to P)))) (\lambda (H6: (eq T -(THead k u t1) (TSort n))).(let H7 \def (eq_ind T (THead k u t1) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TSort n) H6) in (False_ind ((eq T (THead k u t2) x) \to ((subst0 (s k i) v -t1 t2) \to P)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 -H0))))) | (subst0_both v0 u1 u2 i0 H0 k t1 t2 H1) \Rightarrow (\lambda (H2: -(eq nat i0 i)).(\lambda (H3: (eq T v0 v)).(\lambda (H4: (eq T (THead k u1 t1) -(TSort n))).(\lambda (H5: (eq T (THead k u2 t2) x)).(eq_ind nat i (\lambda -(n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t1) (TSort n)) \to ((eq T -(THead k u2 t2) x) \to ((subst0 n0 v0 u1 u2) \to ((subst0 (s k n0) v0 t1 t2) -\to P)))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T -(THead k u1 t1) (TSort n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 i t u1 -u2) \to ((subst0 (s k i) t t1 t2) \to P))))) (\lambda (H7: (eq T (THead k u1 -t1) (TSort n))).(let H8 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match -e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) -H7) in (False_ind ((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to -((subst0 (s k i) v t1 t2) \to P))) H8))) v0 (sym_eq T v0 v H6))) i0 (sym_eq -nat i0 i H2) H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) -(refl_equal T (TSort n)) (refl_equal T x)))))))). +. -theorem subst0_gen_lref: +axiom subst0_gen_lref: \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 i v (TLRef n) x) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) -\def - \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda -(H: (subst0 i v (TLRef n) x)).(let H0 \def (match H in subst0 return (\lambda -(n0: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t1: T).(\lambda (_: -(subst0 n0 t t0 t1)).((eq nat n0 i) \to ((eq T t v) \to ((eq T t0 (TLRef n)) -\to ((eq T t1 x) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))))))) -with [(subst0_lref v0 i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda -(H1: (eq T v0 v)).(\lambda (H2: (eq T (TLRef i0) (TLRef n))).(\lambda (H3: -(eq T (lift (S i0) O v0) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) -\to ((eq T (TLRef n0) (TLRef n)) \to ((eq T (lift (S n0) O v0) x) \to (land -(eq nat n i) (eq T x (lift (S n) O v))))))) (\lambda (H4: (eq T v0 -v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift -(S i) O t) x) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))) (\lambda -(H5: (eq T (TLRef i) (TLRef n))).(let H6 \def (f_equal T nat (\lambda (e: -T).(match e in T return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | -(TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef -n) H5) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O v) x) \to -(land (eq nat n n0) (eq T x (lift (S n) O v))))) (\lambda (H7: (eq T (lift (S -n) O v) x)).(eq_ind T (lift (S n) O v) (\lambda (t: T).(land (eq nat n n) (eq -T t (lift (S n) O v)))) (conj (eq nat n n) (eq T (lift (S n) O v) (lift (S n) -O v)) (refl_equal nat n) (refl_equal T (lift (S n) O v))) x H7)) i (sym_eq -nat i n H6)))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) -| (subst0_fst v0 u2 u1 i0 H0 t k) \Rightarrow (\lambda (H1: (eq nat i0 -i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u1 t) (TLRef -n))).(\lambda (H4: (eq T (THead k u2 t) x)).(eq_ind nat i (\lambda (n0: -nat).((eq T v0 v) \to ((eq T (THead k u1 t) (TLRef n)) \to ((eq T (THead k u2 -t) x) \to ((subst0 n0 v0 u1 u2) \to (land (eq nat n i) (eq T x (lift (S n) O -v)))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq T -(THead k u1 t) (TLRef n)) \to ((eq T (THead k u2 t) x) \to ((subst0 i t0 u1 -u2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) (\lambda (H6: (eq T -(THead k u1 t) (TLRef n))).(let H7 \def (eq_ind T (THead k u1 t) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TLRef n) H6) in (False_ind ((eq T (THead k u2 t) x) \to ((subst0 i v u1 u2) -\to (land (eq nat n i) (eq T x (lift (S n) O v))))) H7))) v0 (sym_eq T v0 v -H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_snd k v0 t2 t1 i0 H0 -u) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 -v)).(\lambda (H3: (eq T (THead k u t1) (TLRef n))).(\lambda (H4: (eq T (THead -k u t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k -u t1) (TLRef n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k n0) v0 t1 t2) -\to (land (eq nat n i) (eq T x (lift (S n) O v)))))))) (\lambda (H5: (eq T v0 -v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u t1) (TLRef n)) \to ((eq T -(THead k u t2) x) \to ((subst0 (s k i) t t1 t2) \to (land (eq nat n i) (eq T -x (lift (S n) O v))))))) (\lambda (H6: (eq T (THead k u t1) (TLRef n))).(let -H7 \def (eq_ind T (THead k u t1) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H6) in -(False_ind ((eq T (THead k u t2) x) \to ((subst0 (s k i) v t1 t2) \to (land -(eq nat n i) (eq T x (lift (S n) O v))))) H7))) v0 (sym_eq T v0 v H5))) i0 -(sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_both v0 u1 u2 i0 H0 k t1 t2 -H1) \Rightarrow (\lambda (H2: (eq nat i0 i)).(\lambda (H3: (eq T v0 -v)).(\lambda (H4: (eq T (THead k u1 t1) (TLRef n))).(\lambda (H5: (eq T -(THead k u2 t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T -(THead k u1 t1) (TLRef n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 n0 v0 -u1 u2) \to ((subst0 (s k n0) v0 t1 t2) \to (land (eq nat n i) (eq T x (lift -(S n) O v))))))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: -T).((eq T (THead k u1 t1) (TLRef n)) \to ((eq T (THead k u2 t2) x) \to -((subst0 i t u1 u2) \to ((subst0 (s k i) t t1 t2) \to (land (eq nat n i) (eq -T x (lift (S n) O v)))))))) (\lambda (H7: (eq T (THead k u1 t1) (TLRef -n))).(let H8 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e in T -return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in -(False_ind ((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to ((subst0 (s -k i) v t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))) H8))) v0 -(sym_eq T v0 v H6))) i0 (sym_eq nat i0 i H2) H3 H4 H5 H0 H1)))))]) in (H0 -(refl_equal nat i) (refl_equal T v) (refl_equal T (TLRef n)) (refl_equal T -x))))))). +. -theorem subst0_gen_head: +axiom subst0_gen_head: \forall (k: K).(\forall (v: T).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).((subst0 i v (THead k u1 t1) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 @@ -158,646 +38,25 @@ u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))))) -\def - \lambda (k: K).(\lambda (v: T).(\lambda (u1: T).(\lambda (t1: T).(\lambda -(x: T).(\lambda (i: nat).(\lambda (H: (subst0 i v (THead k u1 t1) x)).(let H0 -\def (match H in subst0 return (\lambda (n: nat).(\lambda (t: T).(\lambda -(t0: T).(\lambda (t2: T).(\lambda (_: (subst0 n t t0 t2)).((eq nat n i) \to -((eq T t v) \to ((eq T t0 (THead k u1 t1)) \to ((eq T t2 x) \to (or3 (ex2 T -(\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 -u2))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: -T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T x (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))))))))) -with [(subst0_lref v0 i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda -(H1: (eq T v0 v)).(\lambda (H2: (eq T (TLRef i0) (THead k u1 t1))).(\lambda -(H3: (eq T (lift (S i0) O v0) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 -v) \to ((eq T (TLRef n) (THead k u1 t1)) \to ((eq T (lift (S n) O v0) x) \to -(or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: -T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) -(\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 -t2))))))))) (\lambda (H4: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T -(TLRef i) (THead k u1 t1)) \to ((eq T (lift (S i) O t) x) \to (or3 (ex2 T -(\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 -u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: -T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 -u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))) -(\lambda (H5: (eq T (TLRef i) (THead k u1 t1))).(let H6 \def (eq_ind T (TLRef -i) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow -False])) I (THead k u1 t1) H5) in (False_ind ((eq T (lift (S i) O v) x) \to -(or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: -T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) -(\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 -t2)))))) H6))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) -| (subst0_fst v0 u2 u0 i0 H0 t k0) \Rightarrow (\lambda (H1: (eq nat i0 -i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k0 u0 t) (THead k -u1 t1))).(\lambda (H4: (eq T (THead k0 u2 t) x)).(eq_ind nat i (\lambda (n: -nat).((eq T v0 v) \to ((eq T (THead k0 u0 t) (THead k u1 t1)) \to ((eq T -(THead k0 u2 t) x) \to ((subst0 n v0 u0 u2) \to (or3 (ex2 T (\lambda (u3: -T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T -(\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v -t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 -t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))))) (\lambda (H5: (eq T v0 -v)).(eq_ind T v (\lambda (t0: T).((eq T (THead k0 u0 t) (THead k u1 t1)) \to -((eq T (THead k0 u2 t) x) \to ((subst0 i t0 u0 u2) \to (or3 (ex2 T (\lambda -(u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 -T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) -v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 -t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H6: (eq T -(THead k0 u0 t) (THead k u1 t1))).(let H7 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | -(TLRef _) \Rightarrow t | (THead _ _ t0) \Rightarrow t0])) (THead k0 u0 t) -(THead k u1 t1) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e in -T return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) -\Rightarrow u0 | (THead _ t0 _) \Rightarrow t0])) (THead k0 u0 t) (THead k u1 -t1) H6) in ((let H9 \def (f_equal T K (\lambda (e: T).(match e in T return -(\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 -| (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t) (THead k u1 t1) H6) in -(eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq T t t1) \to ((eq T (THead -k1 u2 t) x) \to ((subst0 i v u0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x -(THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: -T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) -(ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))))) (\lambda (H10: (eq T u0 -u1)).(eq_ind T u1 (\lambda (t0: T).((eq T t t1) \to ((eq T (THead k u2 t) x) -\to ((subst0 i v t0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 -t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x -(THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: -T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H11: (eq T t t1)).(eq_ind T t1 -(\lambda (t0: T).((eq T (THead k u2 t0) x) \to ((subst0 i v u1 u2) \to (or3 -(ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i -v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: -T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: -T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 -u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))) -(\lambda (H12: (eq T (THead k u2 t1) x)).(eq_ind T (THead k u2 t1) (\lambda -(t0: T).((subst0 i v u1 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T t0 (THead -k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq -T t0 (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T t0 (THead k u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: -T).(subst0 (s k i) v t1 t2))))))) (\lambda (H13: (subst0 i v u1 -u2)).(or3_intro0 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t1) (THead k u3 -t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T -(THead k u2 t1) (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) -(ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead k u2 t1) (THead k -u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))) (ex_intro2 T (\lambda (u3: -T).(eq T (THead k u2 t1) (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 -u3)) u2 (refl_equal T (THead k u2 t1)) H13))) x H12)) t (sym_eq T t t1 H11))) -u0 (sym_eq T u0 u1 H10))) k0 (sym_eq K k0 k H9))) H8)) H7))) v0 (sym_eq T v0 -v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_snd k0 v0 t2 t0 i0 -H0 u) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 -v)).(\lambda (H3: (eq T (THead k0 u t0) (THead k u1 t1))).(\lambda (H4: (eq T -(THead k0 u t2) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T -(THead k0 u t0) (THead k u1 t1)) \to ((eq T (THead k0 u t2) x) \to ((subst0 -(s k0 n) v0 t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) -(\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead -k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T x (THead k u2 t3)))) (\lambda (u2: T).(\lambda -(_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) -v t1 t3)))))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq -T (THead k0 u t0) (THead k u1 t1)) \to ((eq T (THead k0 u t2) x) \to ((subst0 -(s k0 i) t t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) -(\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead -k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T x (THead k u2 t3)))) (\lambda (u2: T).(\lambda -(_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) -v t1 t3))))))))) (\lambda (H6: (eq T (THead k0 u t0) (THead k u1 t1))).(let -H7 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) -with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) -\Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H6) in ((let H8 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) -\Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H6) in ((let H9 \def -(f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with -[(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) -\Rightarrow k1])) (THead k0 u t0) (THead k u1 t1) H6) in (eq_ind K k (\lambda -(k1: K).((eq T u u1) \to ((eq T t0 t1) \to ((eq T (THead k1 u t2) x) \to -((subst0 (s k1 i) v t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k -u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T -x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead k u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s k i) v t1 t3)))))))))) (\lambda (H10: (eq T u u1)).(eq_ind T u1 -(\lambda (t: T).((eq T t0 t1) \to ((eq T (THead k t t2) x) \to ((subst0 (s k -i) v t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) -(\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead -k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T x (THead k u2 t3)))) (\lambda (u2: T).(\lambda -(_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) -v t1 t3))))))))) (\lambda (H11: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: -T).((eq T (THead k u1 t2) x) \to ((subst0 (s k i) v t t2) \to (or3 (ex2 T -(\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 -u2))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: -T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T x (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))) -(\lambda (H12: (eq T (THead k u1 t2) x)).(eq_ind T (THead k u1 t2) (\lambda -(t: T).((subst0 (s k i) v t1 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T t -(THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: -T).(eq T t (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead k u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))))))) (\lambda (H13: (subst0 (s -k i) v t1 t2)).(or3_intro1 (ex2 T (\lambda (u2: T).(eq T (THead k u1 t2) -(THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: -T).(eq T (THead k u1 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v -t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead k u1 t2) -(THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))) (ex_intro2 T -(\lambda (t3: T).(eq T (THead k u1 t2) (THead k u1 t3))) (\lambda (t3: -T).(subst0 (s k i) v t1 t3)) t2 (refl_equal T (THead k u1 t2)) H13))) x H12)) -t0 (sym_eq T t0 t1 H11))) u (sym_eq T u u1 H10))) k0 (sym_eq K k0 k H9))) -H8)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | -(subst0_both v0 u0 u2 i0 H0 k0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq nat i0 -i)).(\lambda (H3: (eq T v0 v)).(\lambda (H4: (eq T (THead k0 u0 t0) (THead k -u1 t1))).(\lambda (H5: (eq T (THead k0 u2 t2) x)).(eq_ind nat i (\lambda (n: -nat).((eq T v0 v) \to ((eq T (THead k0 u0 t0) (THead k u1 t1)) \to ((eq T -(THead k0 u2 t2) x) \to ((subst0 n v0 u0 u2) \to ((subst0 (s k0 n) v0 t0 t2) -\to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: -T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) -(\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 -t3))))))))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T -(THead k0 u0 t0) (THead k u1 t1)) \to ((eq T (THead k0 u2 t2) x) \to ((subst0 -i t u0 u2) \to ((subst0 (s k0 i) t t0 t2) \to (or3 (ex2 T (\lambda (u3: -T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T -(\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v -t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))))) (\lambda (H7: (eq T -(THead k0 u0 t0) (THead k u1 t1))).(let H8 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | -(TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t0) -(THead k u1 t1) H7) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e in -T return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) -\Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t0) (THead k u1 -t1) H7) in ((let H10 \def (f_equal T K (\lambda (e: T).(match e in T return -(\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 -| (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t0) (THead k u1 t1) H7) in -(eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T -(THead k1 u2 t2) x) \to ((subst0 i v u0 u2) \to ((subst0 (s k1 i) v t0 t2) -\to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: -T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) -(\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 -t3))))))))))) (\lambda (H11: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq -T t0 t1) \to ((eq T (THead k u2 t2) x) \to ((subst0 i v t u2) \to ((subst0 (s -k i) v t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) -(\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead -k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda -(u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda -(_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) -v t1 t3)))))))))) (\lambda (H12: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: -T).((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to ((subst0 (s k i) v t -t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: -T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) -(\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 -t3))))))))) (\lambda (H13: (eq T (THead k u2 t2) x)).(eq_ind T (THead k u2 -t2) (\lambda (t: T).((subst0 i v u1 u2) \to ((subst0 (s k i) v t1 t2) \to -(or3 (ex2 T (\lambda (u3: T).(eq T t (THead k u3 t1))) (\lambda (u3: -T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T t (THead k u1 t3))) -(\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T t (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 -t3)))))))) (\lambda (H14: (subst0 i v u1 u2)).(\lambda (H15: (subst0 (s k i) -v t1 t2)).(or3_intro2 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t2) (THead k -u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T -(THead k u2 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k -u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))) (ex3_2_intro T T (\lambda -(u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) (\lambda -(u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s k i) v t1 t3))) u2 t2 (refl_equal T (THead k u2 t2)) H14 -H15)))) x H13)) t0 (sym_eq T t0 t1 H12))) u0 (sym_eq T u0 u1 H11))) k0 -(sym_eq K k0 k H10))) H9)) H8))) v0 (sym_eq T v0 v H6))) i0 (sym_eq nat i0 i -H2) H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) -(refl_equal T (THead k u1 t1)) (refl_equal T x))))))))). +. -theorem subst0_gen_lift_lt: +axiom subst0_gen_lift_lt: \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i (lift h d u) (lift h (S (plus i d)) t1) x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t1 t2))))))))) -\def - \lambda (u: T).(\lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: -T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i (lift h d -u) (lift h (S (plus i d)) t) x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h -(S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t t2))))))))) (\lambda (n: -nat).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H: (subst0 i (lift h d u) (lift h (S (plus i d)) (TSort n)) -x)).(let H0 \def (eq_ind T (lift h (S (plus i d)) (TSort n)) (\lambda (t: -T).(subst0 i (lift h d u) t x)) H (TSort n) (lift_sort n h (S (plus i d)))) -in (subst0_gen_sort (lift h d u) x i n H0 (ex2 T (\lambda (t2: T).(eq T x -(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TSort n) -t2))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (i: nat).(\lambda -(h: nat).(\lambda (d: nat).(\lambda (H: (subst0 i (lift h d u) (lift h (S -(plus i d)) (TLRef n)) x)).(lt_le_e n (S (plus i d)) (ex2 T (\lambda (t2: -T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef -n) t2))) (\lambda (H0: (lt n (S (plus i d)))).(let H1 \def (eq_ind T (lift h -(S (plus i d)) (TLRef n)) (\lambda (t: T).(subst0 i (lift h d u) t x)) H -(TLRef n) (lift_lref_lt n h (S (plus i d)) H0)) in (and_ind (eq nat n i) (eq -T x (lift (S n) O (lift h d u))) (ex2 T (\lambda (t2: T).(eq T x (lift h (S -(plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2))) (\lambda (H2: -(eq nat n i)).(\lambda (H3: (eq T x (lift (S n) O (lift h d u)))).(eq_ind_r T -(lift (S n) O (lift h d u)) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t -(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2)))) -(eq_ind_r nat i (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T (lift (S n0) -O (lift h d u)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u -(TLRef n0) t2)))) (eq_ind T (lift h (plus (S i) d) (lift (S i) O u)) (\lambda -(t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h (S (plus i d)) t2))) (\lambda -(t2: T).(subst0 i u (TLRef i) t2)))) (ex_intro2 T (\lambda (t2: T).(eq T -(lift h (S (plus i d)) (lift (S i) O u)) (lift h (S (plus i d)) t2))) -(\lambda (t2: T).(subst0 i u (TLRef i) t2)) (lift (S i) O u) (refl_equal T -(lift h (S (plus i d)) (lift (S i) O u))) (subst0_lref u i)) (lift (S i) O -(lift h d u)) (lift_d u h (S i) d O (le_O_n d))) n H2) x H3))) -(subst0_gen_lref (lift h d u) x i n H1)))) (\lambda (H0: (le (S (plus i d)) -n)).(let H1 \def (eq_ind T (lift h (S (plus i d)) (TLRef n)) (\lambda (t: -T).(subst0 i (lift h d u) t x)) H (TLRef (plus n h)) (lift_lref_ge n h (S -(plus i d)) H0)) in (and_ind (eq nat (plus n h) i) (eq T x (lift (S (plus n -h)) O (lift h d u))) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) -t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2))) (\lambda (H2: (eq nat -(plus n h) i)).(\lambda (_: (eq T x (lift (S (plus n h)) O (lift h d -u)))).(let H4 \def (eq_ind_r nat i (\lambda (n0: nat).(le (S (plus n0 d)) n)) -H0 (plus n h) H2) in (le_false n (plus (plus n h) d) (ex2 T (\lambda (t2: -T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef -n) t2))) (le_plus_trans n (plus n h) d (le_plus_l n h)) H4)))) -(subst0_gen_lref (lift h d u) x i (plus n h) H1))))))))))) (\lambda (k: -K).(\lambda (t: T).(\lambda (H: ((\forall (x: T).(\forall (i: nat).(\forall -(h: nat).(\forall (d: nat).((subst0 i (lift h d u) (lift h (S (plus i d)) t) -x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda -(t2: T).(subst0 i u t t2)))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall -(x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i (lift -h d u) (lift h (S (plus i d)) t0) x) \to (ex2 T (\lambda (t2: T).(eq T x -(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t0 -t2)))))))))).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H1: (subst0 i (lift h d u) (lift h (S (plus i d)) (THead k t -t0)) x)).(let H2 \def (eq_ind T (lift h (S (plus i d)) (THead k t t0)) -(\lambda (t2: T).(subst0 i (lift h d u) t2 x)) H1 (THead k (lift h (S (plus i -d)) t) (lift h (s k (S (plus i d))) t0)) (lift_head k t t0 h (S (plus i d)))) -in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k (S (plus -i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h (S (plus i d)) -t) u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i d)) t) -t2))) (\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i -d))) t0) t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k -u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i (lift h d u) (lift h (S -(plus i d)) t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) (lift h -d u) (lift h (s k (S (plus i d))) t0) t2)))) (ex2 T (\lambda (t2: T).(eq T x -(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) -t2))) (\lambda (H3: (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k -(S (plus i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h (S -(plus i d)) t) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead k u2 (lift h -(s k (S (plus i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h -(S (plus i d)) t) u2)) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) -t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x0: -T).(\lambda (H4: (eq T x (THead k x0 (lift h (s k (S (plus i d))) -t0)))).(\lambda (H5: (subst0 i (lift h d u) (lift h (S (plus i d)) t) -x0)).(eq_ind_r T (THead k x0 (lift h (s k (S (plus i d))) t0)) (\lambda (t2: -T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda -(t3: T).(subst0 i u (THead k t t0) t3)))) (ex2_ind T (\lambda (t2: T).(eq T -x0 (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t t2)) (ex2 T -(\lambda (t2: T).(eq T (THead k x0 (lift h (s k (S (plus i d))) t0)) (lift h -(S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) -(\lambda (x1: T).(\lambda (H6: (eq T x0 (lift h (S (plus i d)) x1))).(\lambda -(H7: (subst0 i u t x1)).(eq_ind_r T (lift h (S (plus i d)) x1) (\lambda (t2: -T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 (lift h (s k (S (plus i d))) -t0)) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) -t3)))) (eq_ind T (lift h (S (plus i d)) (THead k x1 t0)) (\lambda (t2: -T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda -(t3: T).(subst0 i u (THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T -(lift h (S (plus i d)) (THead k x1 t0)) (lift h (S (plus i d)) t2))) (\lambda -(t2: T).(subst0 i u (THead k t t0) t2)) (THead k x1 t0) (refl_equal T (lift h -(S (plus i d)) (THead k x1 t0))) (subst0_fst u x1 t i H7 t0 k)) (THead k -(lift h (S (plus i d)) x1) (lift h (s k (S (plus i d))) t0)) (lift_head k x1 -t0 h (S (plus i d)))) x0 H6)))) (H x0 i h d H5)) x H4)))) H3)) (\lambda (H3: -(ex2 T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i d)) t) t2))) -(\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) -t0) t2)))).(ex2_ind T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i -d)) t) t2))) (\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S -(plus i d))) t0) t2)) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) -t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x0: -T).(\lambda (H4: (eq T x (THead k (lift h (S (plus i d)) t) x0))).(\lambda -(H5: (subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) -x0)).(eq_ind_r T (THead k (lift h (S (plus i d)) t) x0) (\lambda (t2: T).(ex2 -T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: -T).(subst0 i u (THead k t t0) t3)))) (let H6 \def (eq_ind nat (s k (S (plus i -d))) (\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h n t0) x0)) H5 (S -(s k (plus i d))) (s_S k (plus i d))) in (let H7 \def (eq_ind nat (s k (plus -i d)) (\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h (S n) t0) x0)) -H6 (plus (s k i) d) (s_plus k i d)) in (ex2_ind T (\lambda (t2: T).(eq T x0 -(lift h (S (plus (s k i) d)) t2))) (\lambda (t2: T).(subst0 (s k i) u t0 t2)) -(ex2 T (\lambda (t2: T).(eq T (THead k (lift h (S (plus i d)) t) x0) (lift h -(S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) -(\lambda (x1: T).(\lambda (H8: (eq T x0 (lift h (S (plus (s k i) d)) -x1))).(\lambda (H9: (subst0 (s k i) u t0 x1)).(eq_ind_r T (lift h (S (plus (s -k i) d)) x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k (lift h -(S (plus i d)) t) t2) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i -u (THead k t t0) t3)))) (eq_ind nat (s k (plus i d)) (\lambda (n: nat).(ex2 T -(\lambda (t2: T).(eq T (THead k (lift h (S (plus i d)) t) (lift h (S n) x1)) -(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) -t2)))) (eq_ind nat (s k (S (plus i d))) (\lambda (n: nat).(ex2 T (\lambda -(t2: T).(eq T (THead k (lift h (S (plus i d)) t) (lift h n x1)) (lift h (S -(plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)))) (eq_ind -T (lift h (S (plus i d)) (THead k t x1)) (\lambda (t2: T).(ex2 T (\lambda -(t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u -(THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift h (S (plus i -d)) (THead k t x1)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u -(THead k t t0) t2)) (THead k t x1) (refl_equal T (lift h (S (plus i d)) -(THead k t x1))) (subst0_snd k u x1 t0 i H9 t)) (THead k (lift h (S (plus i -d)) t) (lift h (s k (S (plus i d))) x1)) (lift_head k t x1 h (S (plus i d)))) -(S (s k (plus i d))) (s_S k (plus i d))) (plus (s k i) d) (s_plus k i d)) x0 -H8)))) (H0 x0 (s k i) h d H7)))) x H4)))) H3)) (\lambda (H3: (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i (lift h d u) (lift h (S (plus i d)) t) u2))) -(\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S -(plus i d))) t0) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq -T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i (lift h d -u) (lift h (S (plus i d)) t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 -(s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) t2))) (ex2 T (\lambda -(t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u -(THead k t t0) t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T x -(THead k x0 x1))).(\lambda (H5: (subst0 i (lift h d u) (lift h (S (plus i d)) -t) x0)).(\lambda (H6: (subst0 (s k i) (lift h d u) (lift h (s k (S (plus i -d))) t0) x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t2: T).(ex2 T (\lambda -(t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u -(THead k t t0) t3)))) (let H7 \def (eq_ind nat (s k (S (plus i d))) (\lambda -(n: nat).(subst0 (s k i) (lift h d u) (lift h n t0) x1)) H6 (S (s k (plus i -d))) (s_S k (plus i d))) in (let H8 \def (eq_ind nat (s k (plus i d)) -(\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h (S n) t0) x1)) H7 -(plus (s k i) d) (s_plus k i d)) in (ex2_ind T (\lambda (t2: T).(eq T x1 -(lift h (S (plus (s k i) d)) t2))) (\lambda (t2: T).(subst0 (s k i) u t0 t2)) -(ex2 T (\lambda (t2: T).(eq T (THead k x0 x1) (lift h (S (plus i d)) t2))) -(\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x2: T).(\lambda -(H9: (eq T x1 (lift h (S (plus (s k i) d)) x2))).(\lambda (H10: (subst0 (s k -i) u t0 x2)).(ex2_ind T (\lambda (t2: T).(eq T x0 (lift h (S (plus i d)) -t2))) (\lambda (t2: T).(subst0 i u t t2)) (ex2 T (\lambda (t2: T).(eq T -(THead k x0 x1) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u -(THead k t t0) t2))) (\lambda (x3: T).(\lambda (H11: (eq T x0 (lift h (S -(plus i d)) x3))).(\lambda (H12: (subst0 i u t x3)).(eq_ind_r T (lift h (S -(plus i d)) x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 -x1) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) -t3)))) (eq_ind_r T (lift h (S (plus (s k i) d)) x2) (\lambda (t2: T).(ex2 T -(\lambda (t3: T).(eq T (THead k (lift h (S (plus i d)) x3) t2) (lift h (S -(plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (eq_ind -nat (s k (plus i d)) (\lambda (n: nat).(ex2 T (\lambda (t2: T).(eq T (THead k -(lift h (S (plus i d)) x3) (lift h (S n) x2)) (lift h (S (plus i d)) t2))) -(\lambda (t2: T).(subst0 i u (THead k t t0) t2)))) (eq_ind nat (s k (S (plus -i d))) (\lambda (n: nat).(ex2 T (\lambda (t2: T).(eq T (THead k (lift h (S -(plus i d)) x3) (lift h n x2)) (lift h (S (plus i d)) t2))) (\lambda (t2: -T).(subst0 i u (THead k t t0) t2)))) (eq_ind T (lift h (S (plus i d)) (THead -k x3 x2)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus -i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (ex_intro2 T -(\lambda (t2: T).(eq T (lift h (S (plus i d)) (THead k x3 x2)) (lift h (S -(plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)) (THead k -x3 x2) (refl_equal T (lift h (S (plus i d)) (THead k x3 x2))) (subst0_both u -t x3 i H12 k t0 x2 H10)) (THead k (lift h (S (plus i d)) x3) (lift h (s k (S -(plus i d))) x2)) (lift_head k x3 x2 h (S (plus i d)))) (S (s k (plus i d))) -(s_S k (plus i d))) (plus (s k i) d) (s_plus k i d)) x1 H9) x0 H11)))) (H x0 -i h d H5))))) (H0 x1 (s k i) h d H8)))) x H4)))))) H3)) (subst0_gen_head k -(lift h d u) (lift h (S (plus i d)) t) (lift h (s k (S (plus i d))) t0) x i -H2))))))))))))) t1)). +. -theorem subst0_gen_lift_false: +axiom subst0_gen_lift_false: \forall (t: T).(\forall (u: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) \to ((subst0 i u (lift h d t) x) \to (\forall (P: Prop).P))))))))) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (u: T).(\forall (x: -T).(\forall (h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to ((lt i -(plus d h)) \to ((subst0 i u (lift h d t0) x) \to (\forall (P: -Prop).P)))))))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (x: T).(\lambda -(h: nat).(\lambda (d: nat).(\lambda (i: nat).(\lambda (_: (le d i)).(\lambda -(_: (lt i (plus d h))).(\lambda (H1: (subst0 i u (lift h d (TSort n)) -x)).(\lambda (P: Prop).(let H2 \def (eq_ind T (lift h d (TSort n)) (\lambda -(t0: T).(subst0 i u t0 x)) H1 (TSort n) (lift_sort n h d)) in -(subst0_gen_sort u x i n H2 P)))))))))))) (\lambda (n: nat).(\lambda (u: -T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (i: -nat).(\lambda (H: (le d i)).(\lambda (H0: (lt i (plus d h))).(\lambda (H1: -(subst0 i u (lift h d (TLRef n)) x)).(\lambda (P: Prop).(lt_le_e n d P -(\lambda (H2: (lt n d)).(let H3 \def (eq_ind T (lift h d (TLRef n)) (\lambda -(t0: T).(subst0 i u t0 x)) H1 (TLRef n) (lift_lref_lt n h d H2)) in (and_ind -(eq nat n i) (eq T x (lift (S n) O u)) P (\lambda (H4: (eq nat n i)).(\lambda -(_: (eq T x (lift (S n) O u))).(let H6 \def (eq_ind nat n (\lambda (n0: -nat).(lt n0 d)) H2 i H4) in (le_false d i P H H6)))) (subst0_gen_lref u x i n -H3)))) (\lambda (H2: (le d n)).(let H3 \def (eq_ind T (lift h d (TLRef n)) -(\lambda (t0: T).(subst0 i u t0 x)) H1 (TLRef (plus n h)) (lift_lref_ge n h d -H2)) in (and_ind (eq nat (plus n h) i) (eq T x (lift (S (plus n h)) O u)) P -(\lambda (H4: (eq nat (plus n h) i)).(\lambda (_: (eq T x (lift (S (plus n -h)) O u))).(let H6 \def (eq_ind_r nat i (\lambda (n0: nat).(lt n0 (plus d -h))) H0 (plus n h) H4) in (le_false d n P H2 (lt_le_S n d (simpl_lt_plus_r h -n d H6)))))) (subst0_gen_lref u x i (plus n h) H3))))))))))))))) (\lambda (k: -K).(\lambda (t0: T).(\lambda (H: ((\forall (u: T).(\forall (x: T).(\forall -(h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) -\to ((subst0 i u (lift h d t0) x) \to (\forall (P: -Prop).P))))))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (u: T).(\forall -(x: T).(\forall (h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to -((lt i (plus d h)) \to ((subst0 i u (lift h d t1) x) \to (\forall (P: -Prop).P))))))))))).(\lambda (u: T).(\lambda (x: T).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (i: nat).(\lambda (H1: (le d i)).(\lambda (H2: (lt i (plus -d h))).(\lambda (H3: (subst0 i u (lift h d (THead k t0 t1)) x)).(\lambda (P: -Prop).(let H4 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t2: -T).(subst0 i u t2 x)) H3 (THead k (lift h d t0) (lift h (s k d) t1)) -(lift_head k t0 t1 h d)) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k -u2 (lift h (s k d) t1)))) (\lambda (u2: T).(subst0 i u (lift h d t0) u2))) -(ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t0) t2))) (\lambda (t2: -T).(subst0 (s k i) u (lift h (s k d) t1) t2))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 -(s k i) u (lift h (s k d) t1) t2)))) P (\lambda (H5: (ex2 T (\lambda (u2: -T).(eq T x (THead k u2 (lift h (s k d) t1)))) (\lambda (u2: T).(subst0 i u -(lift h d t0) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead k u2 (lift h -(s k d) t1)))) (\lambda (u2: T).(subst0 i u (lift h d t0) u2)) P (\lambda -(x0: T).(\lambda (_: (eq T x (THead k x0 (lift h (s k d) t1)))).(\lambda (H7: -(subst0 i u (lift h d t0) x0)).(H u x0 h d i H1 H2 H7 P)))) H5)) (\lambda -(H5: (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t0) t2))) (\lambda -(t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2)))).(ex2_ind T (\lambda (t2: -T).(eq T x (THead k (lift h d t0) t2))) (\lambda (t2: T).(subst0 (s k i) u -(lift h (s k d) t1) t2)) P (\lambda (x0: T).(\lambda (_: (eq T x (THead k -(lift h d t0) x0))).(\lambda (H7: (subst0 (s k i) u (lift h (s k d) t1) -x0)).(H0 u x0 h (s k d) (s k i) (s_le k d i H1) (eq_ind nat (s k (plus d h)) -(\lambda (n: nat).(lt (s k i) n)) (lt_le_S (s k i) (s k (plus d h)) (s_lt k i -(plus d h) H2)) (plus (s k d) h) (s_plus k d h)) H7 P)))) H5)) (\lambda (H5: -(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u (lift h d t0) u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2))))).(ex3_2_ind -T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda -(u2: T).(\lambda (_: T).(subst0 i u (lift h d t0) u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2))) P (\lambda -(x0: T).(\lambda (x1: T).(\lambda (_: (eq T x (THead k x0 x1))).(\lambda (H7: -(subst0 i u (lift h d t0) x0)).(\lambda (_: (subst0 (s k i) u (lift h (s k d) -t1) x1)).(H u x0 h d i H1 H2 H7 P)))))) H5)) (subst0_gen_head k u (lift h d -t0) (lift h (s k d) t1) x i H4))))))))))))))))) t). +. -theorem subst0_gen_lift_ge: +axiom subst0_gen_lift_ge: \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i u (lift h d t1) x) \to ((le (plus d h) i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t1 t2)))))))))) -\def - \lambda (u: T).(\lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: -T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i u (lift h -d t) x) \to ((le (plus d h) i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d -t2))) (\lambda (t2: T).(subst0 (minus i h) u t t2)))))))))) (\lambda (n: -nat).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H: (subst0 i u (lift h d (TSort n)) x)).(\lambda (_: (le (plus -d h) i)).(let H1 \def (eq_ind T (lift h d (TSort n)) (\lambda (t: T).(subst0 -i u t x)) H (TSort n) (lift_sort n h d)) in (subst0_gen_sort u x i n H1 (ex2 -T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i -h) u (TSort n) t2)))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (i: -nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (subst0 i u (lift h d -(TLRef n)) x)).(\lambda (H0: (le (plus d h) i)).(lt_le_e n d (ex2 T (\lambda -(t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TLRef -n) t2))) (\lambda (H1: (lt n d)).(let H2 \def (eq_ind T (lift h d (TLRef n)) -(\lambda (t: T).(subst0 i u t x)) H (TLRef n) (lift_lref_lt n h d H1)) in -(and_ind (eq nat n i) (eq T x (lift (S n) O u)) (ex2 T (\lambda (t2: T).(eq T -x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TLRef n) t2))) -(\lambda (H3: (eq nat n i)).(\lambda (_: (eq T x (lift (S n) O u))).(let H5 -\def (eq_ind nat n (\lambda (n0: nat).(lt n0 d)) H1 i H3) in (le_false (plus -d h) i (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: -T).(subst0 (minus i h) u (TLRef n) t2))) H0 (le_plus_trans (S i) d h H5))))) -(subst0_gen_lref u x i n H2)))) (\lambda (H1: (le d n)).(let H2 \def (eq_ind -T (lift h d (TLRef n)) (\lambda (t: T).(subst0 i u t x)) H (TLRef (plus n h)) -(lift_lref_ge n h d H1)) in (and_ind (eq nat (plus n h) i) (eq T x (lift (S -(plus n h)) O u)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda -(t2: T).(subst0 (minus i h) u (TLRef n) t2))) (\lambda (H3: (eq nat (plus n -h) i)).(\lambda (H4: (eq T x (lift (S (plus n h)) O u))).(eq_ind nat (plus n -h) (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) -(\lambda (t2: T).(subst0 (minus n0 h) u (TLRef n) t2)))) (eq_ind_r T (lift (S -(plus n h)) O u) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h d -t2))) (\lambda (t2: T).(subst0 (minus (plus n h) h) u (TLRef n) t2)))) -(eq_ind_r nat n (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T (lift (S -(plus n h)) O u) (lift h d t2))) (\lambda (t2: T).(subst0 n0 u (TLRef n) -t2)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift (S (plus n h)) O u) (lift h -d t2))) (\lambda (t2: T).(subst0 n u (TLRef n) t2)) (lift (S n) O u) -(eq_ind_r T (lift (plus h (S n)) O u) (\lambda (t: T).(eq T (lift (S (plus n -h)) O u) t)) (eq_ind_r nat (plus h n) (\lambda (n0: nat).(eq T (lift (S n0) O -u) (lift (plus h (S n)) O u))) (eq_ind_r nat (plus h (S n)) (\lambda (n0: -nat).(eq T (lift n0 O u) (lift (plus h (S n)) O u))) (refl_equal T (lift -(plus h (S n)) O u)) (S (plus h n)) (plus_n_Sm h n)) (plus n h) (plus_comm n -h)) (lift h d (lift (S n) O u)) (lift_free u (S n) h O d (le_trans d (S n) -(plus O (S n)) (le_S d n H1) (le_n (plus O (S n)))) (le_O_n d))) (subst0_lref -u n)) (minus (plus n h) h) (minus_plus_r n h)) x H4) i H3))) (subst0_gen_lref -u x i (plus n h) H2)))))))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: -((\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: -nat).((subst0 i u (lift h d t) x) \to ((le (plus d h) i) \to (ex2 T (\lambda -(t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t -t2))))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (x: T).(\forall (i: -nat).(\forall (h: nat).(\forall (d: nat).((subst0 i u (lift h d t0) x) \to -((le (plus d h) i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) -(\lambda (t2: T).(subst0 (minus i h) u t0 t2))))))))))).(\lambda (x: -T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: -(subst0 i u (lift h d (THead k t t0)) x)).(\lambda (H2: (le (plus d h) -i)).(let H3 \def (eq_ind T (lift h d (THead k t t0)) (\lambda (t2: T).(subst0 -i u t2 x)) H1 (THead k (lift h d t) (lift h (s k d) t0)) (lift_head k t t0 h -d)) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k d) -t0)))) (\lambda (u2: T).(subst0 i u (lift h d t) u2))) (ex2 T (\lambda (t2: -T).(eq T x (THead k (lift h d t) t2))) (\lambda (t2: T).(subst0 (s k i) u -(lift h (s k d) t0) t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T -x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u (lift h d -t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) -t0) t2)))) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: -T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (H4: (ex2 T (\lambda -(u2: T).(eq T x (THead k u2 (lift h (s k d) t0)))) (\lambda (u2: T).(subst0 i -u (lift h d t) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead k u2 (lift h -(s k d) t0)))) (\lambda (u2: T).(subst0 i u (lift h d t) u2)) (ex2 T (\lambda -(t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead -k t t0) t2))) (\lambda (x0: T).(\lambda (H5: (eq T x (THead k x0 (lift h (s k -d) t0)))).(\lambda (H6: (subst0 i u (lift h d t) x0)).(eq_ind_r T (THead k x0 -(lift h (s k d) t0)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift -h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) -(ex2_ind T (\lambda (t2: T).(eq T x0 (lift h d t2))) (\lambda (t2: T).(subst0 -(minus i h) u t t2)) (ex2 T (\lambda (t2: T).(eq T (THead k x0 (lift h (s k -d) t0)) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) -t2))) (\lambda (x1: T).(\lambda (H7: (eq T x0 (lift h d x1))).(\lambda (H8: -(subst0 (minus i h) u t x1)).(eq_ind_r T (lift h d x1) (\lambda (t2: T).(ex2 -T (\lambda (t3: T).(eq T (THead k t2 (lift h (s k d) t0)) (lift h d t3))) -(\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (eq_ind T (lift -h d (THead k x1 t0)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift -h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) -(ex_intro2 T (\lambda (t2: T).(eq T (lift h d (THead k x1 t0)) (lift h d -t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2)) (THead k x1 -t0) (refl_equal T (lift h d (THead k x1 t0))) (subst0_fst u x1 t (minus i h) -H8 t0 k)) (THead k (lift h d x1) (lift h (s k d) t0)) (lift_head k x1 t0 h -d)) x0 H7)))) (H x0 i h d H6 H2)) x H5)))) H4)) (\lambda (H4: (ex2 T (\lambda -(t2: T).(eq T x (THead k (lift h d t) t2))) (\lambda (t2: T).(subst0 (s k i) -u (lift h (s k d) t0) t2)))).(ex2_ind T (\lambda (t2: T).(eq T x (THead k -(lift h d t) t2))) (\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t0) -t2)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 -(minus i h) u (THead k t t0) t2))) (\lambda (x0: T).(\lambda (H5: (eq T x -(THead k (lift h d t) x0))).(\lambda (H6: (subst0 (s k i) u (lift h (s k d) -t0) x0)).(eq_ind_r T (THead k (lift h d t) x0) (\lambda (t2: T).(ex2 T -(\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i -h) u (THead k t t0) t3)))) (ex2_ind T (\lambda (t2: T).(eq T x0 (lift h (s k -d) t2))) (\lambda (t2: T).(subst0 (minus (s k i) h) u t0 t2)) (ex2 T (\lambda -(t2: T).(eq T (THead k (lift h d t) x0) (lift h d t2))) (\lambda (t2: -T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x1: T).(\lambda (H7: -(eq T x0 (lift h (s k d) x1))).(\lambda (H8: (subst0 (minus (s k i) h) u t0 -x1)).(eq_ind_r T (lift h (s k d) x1) (\lambda (t2: T).(ex2 T (\lambda (t3: -T).(eq T (THead k (lift h d t) t2) (lift h d t3))) (\lambda (t3: T).(subst0 -(minus i h) u (THead k t t0) t3)))) (eq_ind T (lift h d (THead k t x1)) -(\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda -(t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (let H9 \def (eq_ind_r -nat (minus (s k i) h) (\lambda (n: nat).(subst0 n u t0 x1)) H8 (s k (minus i -h)) (s_minus k i h (le_trans_plus_r d h i H2))) in (ex_intro2 T (\lambda (t2: -T).(eq T (lift h d (THead k t x1)) (lift h d t2))) (\lambda (t2: T).(subst0 -(minus i h) u (THead k t t0) t2)) (THead k t x1) (refl_equal T (lift h d -(THead k t x1))) (subst0_snd k u x1 t0 (minus i h) H9 t))) (THead k (lift h d -t) (lift h (s k d) x1)) (lift_head k t x1 h d)) x0 H7)))) (H0 x0 (s k i) h (s -k d) H6 (eq_ind nat (s k (plus d h)) (\lambda (n: nat).(le n (s k i))) (s_le -k (plus d h) i H2) (plus (s k d) h) (s_plus k d h)))) x H5)))) H4)) (\lambda -(H4: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u (lift h d t) u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2))))).(ex3_2_ind -T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda -(u2: T).(\lambda (_: T).(subst0 i u (lift h d t) u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2))) (ex2 T -(\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) -u (THead k t t0) t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T -x (THead k x0 x1))).(\lambda (H6: (subst0 i u (lift h d t) x0)).(\lambda (H7: -(subst0 (s k i) u (lift h (s k d) t0) x1)).(eq_ind_r T (THead k x0 x1) -(\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda -(t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (ex2_ind T (\lambda (t2: -T).(eq T x1 (lift h (s k d) t2))) (\lambda (t2: T).(subst0 (minus (s k i) h) -u t0 t2)) (ex2 T (\lambda (t2: T).(eq T (THead k x0 x1) (lift h d t2))) -(\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x2: -T).(\lambda (H8: (eq T x1 (lift h (s k d) x2))).(\lambda (H9: (subst0 (minus -(s k i) h) u t0 x2)).(ex2_ind T (\lambda (t2: T).(eq T x0 (lift h d t2))) -(\lambda (t2: T).(subst0 (minus i h) u t t2)) (ex2 T (\lambda (t2: T).(eq T -(THead k x0 x1) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead -k t t0) t2))) (\lambda (x3: T).(\lambda (H10: (eq T x0 (lift h d -x3))).(\lambda (H11: (subst0 (minus i h) u t x3)).(eq_ind_r T (lift h d x3) -(\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 x1) (lift h d -t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (eq_ind_r -T (lift h (s k d) x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k -(lift h d x3) t2) (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u -(THead k t t0) t3)))) (eq_ind T (lift h d (THead k x3 x2)) (\lambda (t2: -T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 -(minus i h) u (THead k t t0) t3)))) (let H12 \def (eq_ind_r nat (minus (s k -i) h) (\lambda (n: nat).(subst0 n u t0 x2)) H9 (s k (minus i h)) (s_minus k i -h (le_trans_plus_r d h i H2))) in (ex_intro2 T (\lambda (t2: T).(eq T (lift h -d (THead k x3 x2)) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u -(THead k t t0) t2)) (THead k x3 x2) (refl_equal T (lift h d (THead k x3 x2))) -(subst0_both u t x3 (minus i h) H11 k t0 x2 H12))) (THead k (lift h d x3) -(lift h (s k d) x2)) (lift_head k x3 x2 h d)) x1 H8) x0 H10)))) (H x0 i h d -H6 H2))))) (H0 x1 (s k i) h (s k d) H7 (eq_ind nat (s k (plus d h)) (\lambda -(n: nat).(le n (s k i))) (s_le k (plus d h) i H2) (plus (s k d) h) (s_plus k -d h)))) x H5)))))) H4)) (subst0_gen_head k u (lift h d t) (lift h (s k d) t0) -x i H3)))))))))))))) t1)). +. diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/defs.ma index d806b04c9..49102e3e0 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/defs.ma @@ -18,7 +18,7 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/defs". include "subst0/defs.ma". -inductive subst1 (i:nat) (v:T) (t1:T): T \to Prop \def +inductive subst1 (i: nat) (v: T) (t1: T): T \to Prop \def | subst1_refl: subst1 i v t1 t1 | subst1_single: \forall (t2: T).((subst0 i v t1 t2) \to (subst1 i v t1 t2)). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/defs.ma index 14373ffcd..84f1a28ca 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/defs.ma @@ -20,7 +20,7 @@ include "G/defs.ma". include "getl/defs.ma". -inductive tau0 (g:G): C \to (T \to (T \to Prop)) \def +inductive tau0 (g: G): C \to (T \to (T \to Prop)) \def | tau0_sort: \forall (c: C).(\forall (n: nat).(tau0 g c (TSort n) (TSort (next g n)))) | tau0_abbr: \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau1/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau1/defs.ma index 52f32692d..c5eeb0138 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau1/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau1/defs.ma @@ -18,7 +18,7 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/tau1/defs". include "tau0/defs.ma". -inductive tau1 (g:G) (c:C) (t1:T): T \to Prop \def +inductive tau1 (g: G) (c: C) (t1: T): T \to Prop \def | tau1_tau0: \forall (t2: T).((tau0 g c t1 t2) \to (tau1 g c t1 t2)) | tau1_sing: \forall (t: T).((tau1 g c t1 t) \to (\forall (t2: T).((tau0 g c t t2) \to (tau1 g c t1 t2)))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma index 2c1ae46cc..b632ec9d4 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma @@ -26,6 +26,10 @@ include "s/defs.ma". include "s/props.ma". +include "tlist/defs.ma". + +include "tlist/props.ma". + include "tlt/defs.ma". include "tlt/props.ma". @@ -310,9 +314,21 @@ include "sc3/defs.ma". include "sc3/props.ma". -include "ceqc/defs.ma". +include "csubc/defs.ma". + +include "csubc/props.ma". + +include "csubc/csuba.ma". + +include "csubc/drop.ma". + +include "csubc/drop1.ma". + +include "csubc/clear.ma". + +include "csubc/getl.ma". -include "ceqc/props.ma". +include "csubc/arity.ma". include "sc3/arity.ma". @@ -346,21 +362,21 @@ include "ty3/fsubst0.ma". include "ty3/subst1.ma". -include "csub3/defs.ma". +include "csubt/defs.ma". -include "csub3/fwd.ma". +include "csubt/fwd.ma". -include "csub3/props.ma". +include "csubt/props.ma". -include "csub3/clear.ma". +include "csubt/clear.ma". -include "csub3/drop.ma". +include "csubt/drop.ma". -include "csub3/getl.ma". +include "csubt/getl.ma". -include "csub3/pc3.ma". +include "csubt/pc3.ma". -include "csub3/ty3.ma". +include "csubt/ty3.ma". include "ty3/pr3.ma". diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlist/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlist/defs.ma new file mode 100644 index 000000000..ab7e3258b --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlist/defs.ma @@ -0,0 +1,49 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/tlist/defs". + +include "T/defs.ma". + +inductive TList: Set \def +| TNil: TList +| TCons: T \to (TList \to TList). + +definition THeads: + K \to (TList \to (T \to T)) +\def + let rec THeads (k: K) (us: TList) on us: (T \to T) \def (\lambda (t: +T).(match us with [TNil \Rightarrow t | (TCons u ul) \Rightarrow (THead k u +(THeads k ul t))])) in THeads. + +definition TApp: + TList \to (T \to TList) +\def + let rec TApp (ts: TList) on ts: (T \to TList) \def (\lambda (v: T).(match ts +with [TNil \Rightarrow (TCons v TNil) | (TCons t ts0) \Rightarrow (TCons t +(TApp ts0 v))])) in TApp. + +definition tslen: + TList \to nat +\def + let rec tslen (ts: TList) on ts: nat \def (match ts with [TNil \Rightarrow O +| (TCons _ ts0) \Rightarrow (S (tslen ts0))]) in tslen. + +definition tslt: + TList \to (TList \to Prop) +\def + \lambda (ts1: TList).(\lambda (ts2: TList).(lt (tslen ts1) (tslen ts2))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlist/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlist/props.ma new file mode 100644 index 000000000..5a91e56b8 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlist/props.ma @@ -0,0 +1,120 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/tlist/props". + +include "tlist/defs.ma". + +theorem tslt_wf__q_ind: + \forall (P: ((TList \to Prop))).(((\forall (n: nat).((\lambda (P0: ((TList +\to Prop))).(\lambda (n0: nat).(\forall (ts: TList).((eq nat (tslen ts) n0) +\to (P0 ts))))) P n))) \to (\forall (ts: TList).(P ts))) +\def + let Q \def (\lambda (P: ((TList \to Prop))).(\lambda (n: nat).(\forall (ts: +TList).((eq nat (tslen ts) n) \to (P ts))))) in (\lambda (P: ((TList \to +Prop))).(\lambda (H: ((\forall (n: nat).(\forall (ts: TList).((eq nat (tslen +ts) n) \to (P ts)))))).(\lambda (ts: TList).(H (tslen ts) ts (refl_equal nat +(tslen ts)))))). + +theorem tslt_wf_ind: + \forall (P: ((TList \to Prop))).(((\forall (ts2: TList).(((\forall (ts1: +TList).((tslt ts1 ts2) \to (P ts1)))) \to (P ts2)))) \to (\forall (ts: +TList).(P ts))) +\def + let Q \def (\lambda (P: ((TList \to Prop))).(\lambda (n: nat).(\forall (ts: +TList).((eq nat (tslen ts) n) \to (P ts))))) in (\lambda (P: ((TList \to +Prop))).(\lambda (H: ((\forall (ts2: TList).(((\forall (ts1: TList).((lt +(tslen ts1) (tslen ts2)) \to (P ts1)))) \to (P ts2))))).(\lambda (ts: +TList).(tslt_wf__q_ind (\lambda (t: TList).(P t)) (\lambda (n: +nat).(lt_wf_ind n (Q (\lambda (t: TList).(P t))) (\lambda (n0: nat).(\lambda +(H0: ((\forall (m: nat).((lt m n0) \to (Q (\lambda (t: TList).(P t)) +m))))).(\lambda (ts0: TList).(\lambda (H1: (eq nat (tslen ts0) n0)).(let H2 +\def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall (m: nat).((lt m n1) \to +(\forall (ts1: TList).((eq nat (tslen ts1) m) \to (P ts1)))))) H0 (tslen ts0) +H1) in (H ts0 (\lambda (ts1: TList).(\lambda (H3: (lt (tslen ts1) (tslen +ts0))).(H2 (tslen ts1) H3 ts1 (refl_equal nat (tslen ts1))))))))))))) ts)))). + +theorem theads_tapp: + \forall (k: K).(\forall (vs: TList).(\forall (v: T).(\forall (t: T).(eq T +(THeads k (TApp vs v) t) (THeads k vs (THead k v t)))))) +\def + \lambda (k: K).(\lambda (vs: TList).(TList_ind (\lambda (t: TList).(\forall +(v: T).(\forall (t0: T).(eq T (THeads k (TApp t v) t0) (THeads k t (THead k v +t0)))))) (\lambda (v: T).(\lambda (t: T).(refl_equal T (THead k v t)))) +(\lambda (t: T).(\lambda (t0: TList).(\lambda (H: ((\forall (v: T).(\forall +(t1: T).(eq T (THeads k (TApp t0 v) t1) (THeads k t0 (THead k v +t1))))))).(\lambda (v: T).(\lambda (t1: T).(eq_ind_r T (THeads k t0 (THead k +v t1)) (\lambda (t2: T).(eq T (THead k t t2) (THead k t (THeads k t0 (THead k +v t1))))) (refl_equal T (THead k t (THeads k t0 (THead k v t1)))) (THeads k +(TApp t0 v) t1) (H v t1))))))) vs)). + +theorem tcons_tapp_ex: + \forall (ts1: TList).(\forall (t1: T).(ex2_2 TList T (\lambda (ts2: +TList).(\lambda (t2: T).(eq TList (TCons t1 ts1) (TApp ts2 t2)))) (\lambda +(ts2: TList).(\lambda (_: T).(eq nat (tslen ts1) (tslen ts2)))))) +\def + \lambda (ts1: TList).(TList_ind (\lambda (t: TList).(\forall (t1: T).(ex2_2 +TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t1 t) (TApp +ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t) (tslen +ts2))))))) (\lambda (t1: T).(ex2_2_intro TList T (\lambda (ts2: +TList).(\lambda (t2: T).(eq TList (TCons t1 TNil) (TApp ts2 t2)))) (\lambda +(ts2: TList).(\lambda (_: T).(eq nat O (tslen ts2)))) TNil t1 (refl_equal +TList (TApp TNil t1)) (refl_equal nat (tslen TNil)))) (\lambda (t: +T).(\lambda (t0: TList).(\lambda (H: ((\forall (t1: T).(ex2_2 TList T +(\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t1 t0) (TApp ts2 +t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t0) (tslen +ts2)))))))).(\lambda (t1: T).(let H_x \def (H t) in (let H0 \def H_x in +(ex2_2_ind TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t +t0) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t0) +(tslen ts2)))) (ex2_2 TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq +TList (TCons t1 (TCons t t0)) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda +(_: T).(eq nat (S (tslen t0)) (tslen ts2))))) (\lambda (x0: TList).(\lambda +(x1: T).(\lambda (H1: (eq TList (TCons t t0) (TApp x0 x1))).(\lambda (H2: (eq +nat (tslen t0) (tslen x0))).(eq_ind_r TList (TApp x0 x1) (\lambda (t2: +TList).(ex2_2 TList T (\lambda (ts2: TList).(\lambda (t3: T).(eq TList (TCons +t1 t2) (TApp ts2 t3)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (S +(tslen t0)) (tslen ts2)))))) (eq_ind_r nat (tslen x0) (\lambda (n: +nat).(ex2_2 TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons +t1 (TApp x0 x1)) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq +nat (S n) (tslen ts2)))))) (ex2_2_intro TList T (\lambda (ts2: +TList).(\lambda (t2: T).(eq TList (TCons t1 (TApp x0 x1)) (TApp ts2 t2)))) +(\lambda (ts2: TList).(\lambda (_: T).(eq nat (S (tslen x0)) (tslen ts2)))) +(TCons t1 x0) x1 (refl_equal TList (TApp (TCons t1 x0) x1)) (refl_equal nat +(tslen (TCons t1 x0)))) (tslen t0) H2) (TCons t t0) H1))))) H0))))))) ts1). + +theorem tlist_ind_rew: + \forall (P: ((TList \to Prop))).((P TNil) \to (((\forall (ts: +TList).(\forall (t: T).((P ts) \to (P (TApp ts t)))))) \to (\forall (ts: +TList).(P ts)))) +\def + \lambda (P: ((TList \to Prop))).(\lambda (H: (P TNil)).(\lambda (H0: +((\forall (ts: TList).(\forall (t: T).((P ts) \to (P (TApp ts +t))))))).(\lambda (ts: TList).(tslt_wf_ind (\lambda (t: TList).(P t)) +(\lambda (ts2: TList).(TList_ind (\lambda (t: TList).(((\forall (ts1: +TList).((tslt ts1 t) \to (P ts1)))) \to (P t))) (\lambda (_: ((\forall (ts1: +TList).((tslt ts1 TNil) \to (P ts1))))).H) (\lambda (t: T).(\lambda (t0: +TList).(\lambda (_: ((((\forall (ts1: TList).((tslt ts1 t0) \to (P ts1)))) +\to (P t0)))).(\lambda (H2: ((\forall (ts1: TList).((tslt ts1 (TCons t t0)) +\to (P ts1))))).(let H_x \def (tcons_tapp_ex t0 t) in (let H3 \def H_x in +(ex2_2_ind TList T (\lambda (ts3: TList).(\lambda (t2: T).(eq TList (TCons t +t0) (TApp ts3 t2)))) (\lambda (ts3: TList).(\lambda (_: T).(eq nat (tslen t0) +(tslen ts3)))) (P (TCons t t0)) (\lambda (x0: TList).(\lambda (x1: +T).(\lambda (H4: (eq TList (TCons t t0) (TApp x0 x1))).(\lambda (H5: (eq nat +(tslen t0) (tslen x0))).(eq_ind_r TList (TApp x0 x1) (\lambda (t1: TList).(P +t1)) (H0 x0 x1 (H2 x0 (eq_ind nat (tslen t0) (\lambda (n: nat).(lt n (tslen +(TCons t t0)))) (le_n (tslen (TCons t t0))) (tslen x0) H5))) (TCons t t0) +H4))))) H3))))))) ts2)) ts)))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/defs.ma index 1eecab2ff..457d1d09b 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/defs.ma @@ -20,7 +20,7 @@ include "G/defs.ma". include "pc3/defs.ma". -inductive ty3 (g:G): C \to (T \to (T \to Prop)) \def +inductive ty3 (g: G): C \to (T \to (T \to Prop)) \def | ty3_conv: \forall (c: C).(\forall (t2: T).(\forall (t: T).((ty3 g c t2 t) \to (\forall (u: T).(\forall (t1: T).((ty3 g c u t1) \to ((pc3 c t1 t2) \to (ty3 g c u t2)))))))) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/pr3.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/pr3.ma index 0c14d34f3..55a2457a9 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/pr3.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/pr3.ma @@ -16,7 +16,7 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/pr3". -include "csub3/ty3.ma". +include "csubt/ty3.ma". include "ty3/subst1.ma". @@ -427,9 +427,9 @@ t0))))).(ty3_conv g c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x0)) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) (THead (Bind Abst) u t0) x0 (ty3_bind g c2 u x1 H20 Abst t0 x0 H21 x2 H22)) (THead (Bind Abbr) v2 t4) (THead (Bind Abbr) v2 x3) (ty3_bind g -c2 v2 u (H1 c2 H4 v2 H14) Abbr t4 x3 (csub3_ty3_ld g c2 v2 u0 (ty3_conv g c2 +c2 v2 u (H1 c2 H4 v2 H14) Abbr t4 x3 (csubt_ty3_ld g c2 v2 u0 (ty3_conv g c2 u0 x4 H24 v2 u (H1 c2 H4 v2 H14) (pc3_s c2 u u0 H27)) t4 x3 H25) x5 -(csub3_ty3_ld g c2 v2 u0 (ty3_conv g c2 u0 x4 H24 v2 u (H1 c2 H4 v2 H14) +(csubt_ty3_ld g c2 v2 u0 (ty3_conv g c2 u0 x4 H24 v2 u (H1 c2 H4 v2 H14) (pc3_s c2 u u0 H27)) x3 x5 H26)) (pc3_t (THead (Bind Abbr) v2 t0) c2 (THead (Bind Abbr) v2 x3) (pc3_head_2 c2 v2 x3 t0 (Bind Abbr) (H28 Abbr v2)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_pr2_x c2 (THead (Bind Abbr) v2 -- 2.39.2