From 076f639446efce8d8cf83dcf7ca40b4376fc8c36 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Tue, 26 Feb 2008 17:16:12 +0000 Subject: [PATCH] LAMBDA-TYPES: added wf3 (legal context predicate); Unified-Sub removed because of its early stage --- .../LAMBDA-TYPES/LambdaDelta-1/aprem/fwd.ma | 112 ++ .../LAMBDA-TYPES/LambdaDelta-1/arity/aprem.ma | 276 ++--- .../LAMBDA-TYPES/LambdaDelta-1/definitions.ma | 2 + .../LAMBDA-TYPES/LambdaDelta-1/spare.ma | 986 ------------------ .../LAMBDA-TYPES/LambdaDelta-1/theory.ma | 2 +- .../LAMBDA-TYPES/LambdaDelta-1/ty3/props.ma | 212 ++++ .../LAMBDA-TYPES/LambdaDelta-1/wf3/clear.ma | 85 ++ .../preamble.ma => LambdaDelta-1/wf3/defs.ma} | 27 +- .../LAMBDA-TYPES/LambdaDelta-1/wf3/fwd.ma | 299 ++++++ .../LAMBDA-TYPES/LambdaDelta-1/wf3/getl.ma | 199 ++++ .../LAMBDA-TYPES/LambdaDelta-1/wf3/props.ma | 146 +++ .../LAMBDA-TYPES/LambdaDelta-1/wf3/ty3.ma | 126 +++ .../matita/contribs/LAMBDA-TYPES/Makefile | 8 +- .../LAMBDA-TYPES/Unified-Sub/Lift/defs.ma | 35 - .../LAMBDA-TYPES/Unified-Sub/Lift/fun.ma | 55 - .../LAMBDA-TYPES/Unified-Sub/Lift/inv.ma | 147 --- .../LAMBDA-TYPES/Unified-Sub/Lift/props.ma | 81 -- .../Unified-Sub/datatypes/Context.ma | 25 - .../Unified-Sub/datatypes/Term.ma | 51 - .../matita/contribs/LAMBDA-TYPES/root | 2 +- 20 files changed, 1289 insertions(+), 1587 deletions(-) create mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/aprem/fwd.ma create mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/clear.ma rename helm/software/matita/contribs/LAMBDA-TYPES/{Unified-Sub/preamble.ma => LambdaDelta-1/wf3/defs.ma} (57%) create mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/fwd.ma create mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/getl.ma create mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/props.ma create mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/ty3.ma delete mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/defs.ma delete mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/fun.ma delete mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/inv.ma delete mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/props.ma delete mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/datatypes/Context.ma delete mode 100644 helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/datatypes/Term.ma diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/aprem/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/aprem/fwd.ma new file mode 100644 index 000000000..431b69d75 --- /dev/null +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/aprem/fwd.ma @@ -0,0 +1,112 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +include "LambdaDelta-1/aprem/defs.ma". + +theorem aprem_gen_sort: + \forall (x: A).(\forall (i: nat).(\forall (h: nat).(\forall (n: nat).((aprem +i (ASort h n) x) \to False)))) +\def + \lambda (x: A).(\lambda (i: nat).(\lambda (h: nat).(\lambda (n: +nat).(\lambda (H: (aprem i (ASort h n) x)).(insert_eq A (ASort h n) (\lambda +(a: A).(aprem i a x)) (\lambda (_: A).False) (\lambda (y: A).(\lambda (H0: +(aprem i y x)).(aprem_ind (\lambda (_: nat).(\lambda (a: A).(\lambda (_: +A).((eq A a (ASort h n)) \to False)))) (\lambda (a1: A).(\lambda (a2: +A).(\lambda (H1: (eq A (AHead a1 a2) (ASort h n))).(let H2 \def (eq_ind A +(AHead a1 a2) (\lambda (ee: A).(match ee in A return (\lambda (_: A).Prop) +with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I +(ASort h n) H1) in (False_ind False H2))))) (\lambda (a2: A).(\lambda (a: +A).(\lambda (i0: nat).(\lambda (_: (aprem i0 a2 a)).(\lambda (_: (((eq A a2 +(ASort h n)) \to False))).(\lambda (a1: A).(\lambda (H3: (eq A (AHead a1 a2) +(ASort h n))).(let H4 \def (eq_ind A (AHead a1 a2) (\lambda (ee: A).(match ee +in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | +(AHead _ _) \Rightarrow True])) I (ASort h n) H3) in (False_ind False +H4))))))))) i y x H0))) H))))). + +theorem aprem_gen_head_O: + \forall (a1: A).(\forall (a2: A).(\forall (x: A).((aprem O (AHead a1 a2) x) +\to (eq A x a1)))) +\def + \lambda (a1: A).(\lambda (a2: A).(\lambda (x: A).(\lambda (H: (aprem O +(AHead a1 a2) x)).(insert_eq A (AHead a1 a2) (\lambda (a: A).(aprem O a x)) +(\lambda (_: A).(eq A x a1)) (\lambda (y: A).(\lambda (H0: (aprem O y +x)).(insert_eq nat O (\lambda (n: nat).(aprem n y x)) (\lambda (_: nat).((eq +A y (AHead a1 a2)) \to (eq A x a1))) (\lambda (y0: nat).(\lambda (H1: (aprem +y0 y x)).(aprem_ind (\lambda (n: nat).(\lambda (a: A).(\lambda (a0: A).((eq +nat n O) \to ((eq A a (AHead a1 a2)) \to (eq A a0 a1)))))) (\lambda (a0: +A).(\lambda (a3: A).(\lambda (_: (eq nat O O)).(\lambda (H3: (eq A (AHead a0 +a3) (AHead a1 a2))).(let H4 \def (f_equal A A (\lambda (e: A).(match e in A +return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead a _) +\Rightarrow a])) (AHead a0 a3) (AHead a1 a2) H3) in ((let H5 \def (f_equal A +A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) +\Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a0 a3) (AHead a1 a2) H3) +in (\lambda (H6: (eq A a0 a1)).(eq_ind_r A a1 (\lambda (a: A).(eq A a a1)) +(refl_equal A a1) a0 H6))) H4)))))) (\lambda (a0: A).(\lambda (a: A).(\lambda +(i: nat).(\lambda (H2: (aprem i a0 a)).(\lambda (H3: (((eq nat i O) \to ((eq +A a0 (AHead a1 a2)) \to (eq A a a1))))).(\lambda (a3: A).(\lambda (H4: (eq +nat (S i) O)).(\lambda (H5: (eq A (AHead a3 a0) (AHead a1 a2))).(let H6 \def +(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with +[(ASort _ _) \Rightarrow a3 | (AHead a4 _) \Rightarrow a4])) (AHead a3 a0) +(AHead a1 a2) H5) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e in A +return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead _ a4) +\Rightarrow a4])) (AHead a3 a0) (AHead a1 a2) H5) in (\lambda (_: (eq A a3 +a1)).(let H9 \def (eq_ind A a0 (\lambda (a4: A).((eq nat i O) \to ((eq A a4 +(AHead a1 a2)) \to (eq A a a1)))) H3 a2 H7) in (let H10 \def (eq_ind A a0 +(\lambda (a4: A).(aprem i a4 a)) H2 a2 H7) in (let H11 \def (eq_ind nat (S i) +(\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (eq A a +a1) H11)))))) H6)))))))))) y0 y x H1))) H0))) H)))). + +theorem aprem_gen_head_S: + \forall (a1: A).(\forall (a2: A).(\forall (x: A).(\forall (i: nat).((aprem +(S i) (AHead a1 a2) x) \to (aprem i a2 x))))) +\def + \lambda (a1: A).(\lambda (a2: A).(\lambda (x: A).(\lambda (i: nat).(\lambda +(H: (aprem (S i) (AHead a1 a2) x)).(insert_eq A (AHead a1 a2) (\lambda (a: +A).(aprem (S i) a x)) (\lambda (_: A).(aprem i a2 x)) (\lambda (y: +A).(\lambda (H0: (aprem (S i) y x)).(insert_eq nat (S i) (\lambda (n: +nat).(aprem n y x)) (\lambda (_: nat).((eq A y (AHead a1 a2)) \to (aprem i a2 +x))) (\lambda (y0: nat).(\lambda (H1: (aprem y0 y x)).(aprem_ind (\lambda (n: +nat).(\lambda (a: A).(\lambda (a0: A).((eq nat n (S i)) \to ((eq A a (AHead +a1 a2)) \to (aprem i a2 a0)))))) (\lambda (a0: A).(\lambda (a3: A).(\lambda +(H2: (eq nat O (S i))).(\lambda (H3: (eq A (AHead a0 a3) (AHead a1 a2))).(let +H4 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) +with [(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) (AHead a0 a3) +(AHead a1 a2) H3) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e in A +return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) +\Rightarrow a])) (AHead a0 a3) (AHead a1 a2) H3) in (\lambda (H6: (eq A a0 +a1)).(eq_ind_r A a1 (\lambda (a: A).(aprem i a2 a)) (let H7 \def (eq_ind nat +O (\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow True | (S _) \Rightarrow False])) I (S i) H2) in (False_ind +(aprem i a2 a1) H7)) a0 H6))) H4)))))) (\lambda (a0: A).(\lambda (a: +A).(\lambda (i0: nat).(\lambda (H2: (aprem i0 a0 a)).(\lambda (H3: (((eq nat +i0 (S i)) \to ((eq A a0 (AHead a1 a2)) \to (aprem i a2 a))))).(\lambda (a3: +A).(\lambda (H4: (eq nat (S i0) (S i))).(\lambda (H5: (eq A (AHead a3 a0) +(AHead a1 a2))).(let H6 \def (f_equal A A (\lambda (e: A).(match e in A +return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead a4 _) +\Rightarrow a4])) (AHead a3 a0) (AHead a1 a2) H5) in ((let H7 \def (f_equal A +A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) +\Rightarrow a0 | (AHead _ a4) \Rightarrow a4])) (AHead a3 a0) (AHead a1 a2) +H5) in (\lambda (_: (eq A a3 a1)).(let H9 \def (eq_ind A a0 (\lambda (a4: +A).((eq nat i0 (S i)) \to ((eq A a4 (AHead a1 a2)) \to (aprem i a2 a)))) H3 +a2 H7) in (let H10 \def (eq_ind A a0 (\lambda (a4: A).(aprem i0 a4 a)) H2 a2 +H7) in (let H11 \def (f_equal nat nat (\lambda (e: nat).(match e in nat +return (\lambda (_: nat).nat) with [O \Rightarrow i0 | (S n) \Rightarrow n])) +(S i0) (S i) H4) in (let H12 \def (eq_ind nat i0 (\lambda (n: nat).((eq nat n +(S i)) \to ((eq A a2 (AHead a1 a2)) \to (aprem i a2 a)))) H9 i H11) in (let +H13 \def (eq_ind nat i0 (\lambda (n: nat).(aprem n a2 a)) H10 i H11) in +H13))))))) H6)))))))))) y0 y x H1))) H0))) H))))). + diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/aprem.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/aprem.ma index 6113a2a11..bfcc4fab3 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/aprem.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/aprem.ma @@ -20,6 +20,8 @@ include "LambdaDelta-1/arity/cimp.ma". include "LambdaDelta-1/aprem/props.ma". +include "LambdaDelta-1/aprem/fwd.ma". + theorem arity_aprem: \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t a) \to (\forall (i: nat).(\forall (b: A).((aprem i a b) \to (ex2_3 C T nat @@ -33,37 +35,10 @@ A).(\forall (i: nat).(\forall (b: A).((aprem i a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (i: nat).(\lambda -(b: A).(\lambda (H0: (aprem i (ASort O n) b)).(let H1 \def (match H0 in aprem -return (\lambda (n0: nat).(\lambda (a0: A).(\lambda (a1: A).(\lambda (_: -(aprem n0 a0 a1)).((eq nat n0 i) \to ((eq A a0 (ASort O n)) \to ((eq A a1 b) -\to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop -(plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: -nat).(arity g d u (asucc g b))))))))))))) with [(aprem_zero a1 a2) -\Rightarrow (\lambda (H1: (eq nat O i)).(\lambda (H2: (eq A (AHead a1 a2) -(ASort O n))).(\lambda (H3: (eq A a1 b)).(eq_ind nat O (\lambda (n0: -nat).((eq A (AHead a1 a2) (ASort O n)) \to ((eq A a1 b) \to (ex2_3 C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n0 j) O d -c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc -g b))))))))) (\lambda (H4: (eq A (AHead a1 a2) (ASort O n))).(let H5 \def -(eq_ind A (AHead a1 a2) (\lambda (e: A).(match e in A return (\lambda (_: -A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow -True])) I (ASort O n) H4) in (False_ind ((eq A a1 b) \to (ex2_3 C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) -(\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g -b))))))) H5))) i H1 H2 H3)))) | (aprem_succ a2 a0 i0 H1 a1) \Rightarrow -(\lambda (H2: (eq nat (S i0) i)).(\lambda (H3: (eq A (AHead a1 a2) (ASort O -n))).(\lambda (H4: (eq A a0 b)).(eq_ind nat (S i0) (\lambda (n0: nat).((eq A -(AHead a1 a2) (ASort O n)) \to ((eq A a0 b) \to ((aprem i0 a2 a0) \to (ex2_3 -C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n0 j) O -d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u -(asucc g b)))))))))) (\lambda (H5: (eq A (AHead a1 a2) (ASort O n))).(let H6 -\def (eq_ind A (AHead a1 a2) (\lambda (e: A).(match e in A return (\lambda -(_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow -True])) I (ASort O n) H5) in (False_ind ((eq A a0 b) \to ((aprem i0 a2 a0) -\to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop -(plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: -nat).(arity g d u (asucc g b)))))))) H6))) i H2 H3 H4 H1))))]) in (H1 -(refl_equal nat i) (refl_equal A (ASort O n)) (refl_equal A b)))))))) +(b: A).(\lambda (H0: (aprem i (ASort O n) b)).(let H_x \def (aprem_gen_sort b +i O n H0) in (let H1 \def H_x in (False_ind (ex2_3 C T nat (\lambda (d: +C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: +C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))) H1)))))))) (\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: ((\forall (i0: nat).(\forall (b: A).((aprem @@ -151,164 +126,93 @@ A).(\lambda (H4: (aprem i (AHead a1 a2) b)).(nat_ind (\lambda (n: nat).((aprem n (AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))))) (\lambda (H5: -(aprem O (AHead a1 a2) b)).(let H6 \def (match H5 in aprem return (\lambda -(n: nat).(\lambda (a0: A).(\lambda (a3: A).(\lambda (_: (aprem n a0 a3)).((eq -nat n O) \to ((eq A a0 (AHead a1 a2)) \to ((eq A a3 b) \to (ex2_3 C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) +(aprem O (AHead a1 a2) b)).(let H_y \def (aprem_gen_head_O a1 a2 b H5) in +(eq_ind_r A a1 (\lambda (a0: A).(ex2_3 C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g a0))))))) (ex2_3_intro C T +nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d +c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 +(asucc g a1))))) c0 u O (drop_refl c0) H0) b H_y))) (\lambda (i0: +nat).(\lambda (_: (((aprem i0 (AHead a1 a2) b) \to (ex2_3 C T nat (\lambda +(d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b))))))))))))) with [(aprem_zero a0 a3) \Rightarrow (\lambda (_: (eq nat O -O)).(\lambda (H7: (eq A (AHead a0 a3) (AHead a1 a2))).(\lambda (H8: (eq A a0 -b)).((let H9 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda -(_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a4) \Rightarrow a4])) -(AHead a0 a3) (AHead a1 a2) H7) in ((let H10 \def (f_equal A A (\lambda (e: -A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | -(AHead a4 _) \Rightarrow a4])) (AHead a0 a3) (AHead a1 a2) H7) in (eq_ind A -a1 (\lambda (a4: A).((eq A a3 a2) \to ((eq A a4 b) \to (ex2_3 C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) +b))))))))).(\lambda (H5: (aprem (S i0) (AHead a1 a2) b)).(let H_y \def +(aprem_gen_head_S a1 a2 b i0 H5) in (let H_x \def (H3 i0 b H_y) in (let H6 +\def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i0 j) O d (CHead c0 (Bind Abst) u))))) (\lambda (d: +C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) (ex2_3 C +T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S i0) j) +O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 +(asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: +nat).(\lambda (H7: (drop (plus i0 x2) O x0 (CHead c0 (Bind Abst) +u))).(\lambda (H8: (arity g x0 x1 (asucc g b))).(ex2_3_intro C T nat (\lambda +(d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b))))))))) (\lambda (H11: (eq A a3 a2)).(eq_ind A a2 (\lambda (_: A).((eq A -a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d u0 (asucc g b)))))))) (\lambda (H12: (eq A a1 b)).(eq_ind -A b (\lambda (_: A).(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda -(j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u0: -T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))) (eq_ind A a1 (\lambda -(a4: A).(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d u0 (asucc g a4))))))) (ex2_3_intro C T nat (\lambda (d: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: -C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g a1))))) c0 u O -(drop_refl c0) H0) b H12) a1 (sym_eq A a1 b H12))) a3 (sym_eq A a3 a2 H11))) -a0 (sym_eq A a0 a1 H10))) H9)) H8)))) | (aprem_succ a0 a3 i0 H6 a4) -\Rightarrow (\lambda (H7: (eq nat (S i0) O)).(\lambda (H8: (eq A (AHead a4 -a0) (AHead a1 a2))).(\lambda (H9: (eq A a3 b)).((let H10 \def (eq_ind nat (S -i0) (\lambda (e: nat).(match e in nat return (\lambda (_: nat).Prop) with [O -\Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind ((eq A -(AHead a4 a0) (AHead a1 a2)) \to ((eq A a3 b) \to ((aprem i0 a0 a3) \to -(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus -O j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d -u0 (asucc g b))))))))) H10)) H8 H9 H6))))]) in (H6 (refl_equal nat O) -(refl_equal A (AHead a1 a2)) (refl_equal A b)))) (\lambda (i0: nat).(\lambda -(_: (((aprem i0 (AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda -(_: T).(\lambda (j: nat).(drop (plus i0 j) O d c0)))) (\lambda (d: -C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b))))))))).(\lambda (H5: (aprem (S i0) (AHead a1 a2) b)).(let H6 \def (match -H5 in aprem return (\lambda (n: nat).(\lambda (a0: A).(\lambda (a3: -A).(\lambda (_: (aprem n a0 a3)).((eq nat n (S i0)) \to ((eq A a0 (AHead a1 -a2)) \to ((eq A a3 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: -C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))))) -with [(aprem_zero a0 a3) \Rightarrow (\lambda (H6: (eq nat O (S -i0))).(\lambda (H7: (eq A (AHead a0 a3) (AHead a1 a2))).(\lambda (H8: (eq A -a0 b)).((let H9 \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 i0) H6) in (False_ind ((eq A (AHead a0 a3) (AHead a1 a2)) \to ((eq A a0 -b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop -(plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: -nat).(arity g d u0 (asucc g b)))))))) H9)) H7 H8)))) | (aprem_succ a0 a3 i1 -H6 a4) \Rightarrow (\lambda (H7: (eq nat (S i1) (S i0))).(\lambda (H8: (eq A -(AHead a4 a0) (AHead a1 a2))).(\lambda (H9: (eq A a3 b)).((let H10 \def -(f_equal nat nat (\lambda (e: nat).(match e in nat return (\lambda (_: -nat).nat) with [O \Rightarrow i1 | (S n) \Rightarrow n])) (S i1) (S i0) H7) -in (eq_ind nat i0 (\lambda (n: nat).((eq A (AHead a4 a0) (AHead a1 a2)) \to -((eq A a3 b) \to ((aprem n a0 a3) \to (ex2_3 C T nat (\lambda (d: C).(\lambda -(_: T).(\lambda (j: nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: -C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))))))) -(\lambda (H11: (eq A (AHead a4 a0) (AHead a1 a2))).(let H12 \def (f_equal A A -(\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a0 | (AHead _ a5) \Rightarrow a5])) (AHead a4 a0) (AHead a1 a2) -H11) in ((let H13 \def (f_equal A A (\lambda (e: A).(match e in A return -(\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead a5 _) -\Rightarrow a5])) (AHead a4 a0) (AHead a1 a2) H11) in (eq_ind A a1 (\lambda -(_: A).((eq A a0 a2) \to ((eq A a3 b) \to ((aprem i0 a0 a3) \to (ex2_3 C T -nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S i0) j) O -d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 -(asucc g b)))))))))) (\lambda (H14: (eq A a0 a2)).(eq_ind A a2 (\lambda (a5: -A).((eq A a3 b) \to ((aprem i0 a5 a3) \to (ex2_3 C T nat (\lambda (d: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S i0) j) O d c0)))) -(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b))))))))) (\lambda (H15: (eq A a3 b)).(eq_ind A b (\lambda (a5: A).((aprem -i0 a2 a5) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u0: -T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))))) (\lambda (H16: (aprem -i0 a2 b)).(let H_x \def (H3 i0 b H16) in (let H17 \def H_x in (ex2_3_ind C T -nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d -(CHead c0 (Bind Abst) u))))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: -nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda -(_: T).(\lambda (j: nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: -C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) (\lambda -(x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H18: (drop (plus i0 x2) -O x0 (CHead c0 (Bind Abst) u))).(\lambda (H19: (arity g x0 x1 (asucc g -b))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u0: -T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) x0 x1 x2 (drop_S Abst x0 -c0 u (plus i0 x2) H18) H19)))))) H17)))) a3 (sym_eq A a3 b H15))) a0 (sym_eq -A a0 a2 H14))) a4 (sym_eq A a4 a1 H13))) H12))) i1 (sym_eq nat i1 i0 H10))) -H8 H9 H6))))]) in (H6 (refl_equal nat (S i0)) (refl_equal A (AHead a1 a2)) -(refl_equal A b)))))) i H4))))))))))))) (\lambda (c0: C).(\lambda (u: -T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: ((\forall -(i: nat).(\forall (b: A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: -C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b))))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 -(AHead a1 a2))).(\lambda (H3: ((\forall (i: nat).(\forall (b: A).((aprem i -(AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda -(j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: -T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (i: -nat).(\lambda (b: A).(\lambda (H4: (aprem i a2 b)).(let H5 \def (H3 (S i) b -(aprem_succ a2 b i H4 a1)) in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (S (plus i j)) O d c0)))) (\lambda (d: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) -(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H6: -(drop (S (plus i x2)) O x0 c0)).(\lambda (H7: (arity g x0 x1 (asucc g -b))).(C_ind (\lambda (c1: C).((drop (S (plus i x2)) O c1 c0) \to ((arity g c1 -x1 (asucc g b)) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda -(j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: -T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))) (\lambda (n: -nat).(\lambda (H8: (drop (S (plus i x2)) O (CSort n) c0)).(\lambda (_: (arity -g (CSort n) x1 (asucc g b))).(and3_ind (eq C c0 (CSort n)) (eq nat (S (plus i -x2)) O) (eq nat O O) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda -(j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: -T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) (\lambda (_: (eq C c0 -(CSort n))).(\lambda (H11: (eq nat (S (plus i x2)) O)).(\lambda (_: (eq nat O -O)).(let H13 \def (eq_ind nat (S (plus i x2)) (\lambda (ee: nat).(match ee in -nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) -\Rightarrow True])) I O H11) in (False_ind (ex2_3 C T nat (\lambda (d: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: -C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) H13))))) -(drop_gen_sort n (S (plus i x2)) O c0 H8))))) (\lambda (d: C).(\lambda (IHd: -(((drop (S (plus i x2)) O d c0) \to ((arity g d x1 (asucc g b)) \to (ex2_3 C -T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O -d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 -(asucc g b)))))))))).(\lambda (k: K).(\lambda (t1: T).(\lambda (H8: (drop (S -(plus i x2)) O (CHead d k t1) c0)).(\lambda (H9: (arity g (CHead d k t1) x1 -(asucc g b))).(K_ind (\lambda (k0: K).((arity g (CHead d k0 t1) x1 (asucc g -b)) \to ((drop (r k0 (plus i x2)) O d c0) \to (ex2_3 C T nat (\lambda (d0: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda -(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))))))) -(\lambda (b0: B).(\lambda (H10: (arity g (CHead d (Bind b0) t1) x1 (asucc g -b))).(\lambda (H11: (drop (r (Bind b0) (plus i x2)) O d c0)).(ex2_3_intro C T -nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 -c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 -(asucc g b))))) (CHead d (Bind b0) t1) x1 (S x2) (eq_ind nat (S (plus i x2)) -(\lambda (n: nat).(drop n O (CHead d (Bind b0) t1) c0)) (drop_drop (Bind b0) -(plus i x2) d c0 H11 t1) (plus i (S x2)) (plus_n_Sm i x2)) H10)))) (\lambda -(f: F).(\lambda (H10: (arity g (CHead d (Flat f) t1) x1 (asucc g -b))).(\lambda (H11: (drop (r (Flat f) (plus i x2)) O d c0)).(let H12 \def -(IHd H11 (arity_cimp_conf g (CHead d (Flat f) t1) x1 (asucc g b) H10 d -(cimp_flat_sx f d t1))) in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: +b))))) x0 x1 x2 (drop_S Abst x0 c0 u (plus i0 x2) H7) H8)))))) H6))))))) i +H4))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda +(_: (arity g c0 u a1)).(\lambda (_: ((\forall (i: nat).(\forall (b: +A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (t0: +T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda (H3: +((\forall (i: nat).(\forall (b: A).((aprem i (AHead a1 a2) b) \to (ex2_3 C T +nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d +c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 +(asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem +i a2 b)).(let H5 \def (H3 (S i) b (aprem_succ a2 b i H4 a1)) in (ex2_3_ind C +T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (S (plus i j)) +O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 +(asucc g b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (x2: nat).(\lambda (H6: (drop (S (plus i x2)) O x0 c0)).(\lambda +(H7: (arity g x0 x1 (asucc g b))).(C_ind (\lambda (c1: C).((drop (S (plus i +x2)) O c1 c0) \to ((arity g c1 x1 (asucc g b)) \to (ex2_3 C T nat (\lambda +(d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda +(d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))) +(\lambda (n: nat).(\lambda (H8: (drop (S (plus i x2)) O (CSort n) +c0)).(\lambda (_: (arity g (CSort n) x1 (asucc g b))).(and3_ind (eq C c0 +(CSort n)) (eq nat (S (plus i x2)) O) (eq nat O O) (ex2_3 C T nat (\lambda +(d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda +(d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) +(\lambda (_: (eq C c0 (CSort n))).(\lambda (H11: (eq nat (S (plus i x2)) +O)).(\lambda (_: (eq nat O O)).(let H13 \def (eq_ind nat (S (plus i x2)) +(\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H11) in (False_ind (ex2_3 C +T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d +c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 +(asucc g b)))))) H13))))) (drop_gen_sort n (S (plus i x2)) O c0 H8))))) +(\lambda (d: C).(\lambda (IHd: (((drop (S (plus i x2)) O d c0) \to ((arity g +d x1 (asucc g b)) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat -(\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 -c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 -(asucc g b)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: -nat).(\lambda (H13: (drop (plus i x5) O x3 c0)).(\lambda (H14: (arity g x3 x4 -(asucc g b))).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda -(j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: -T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x3 x4 x5 H13 H14)))))) -H12))))) k H9 (drop_gen_drop k d c0 t1 (plus i x2) H8)))))))) x0 H6 H7)))))) +(u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))))))).(\lambda (k: +K).(\lambda (t1: T).(\lambda (H8: (drop (S (plus i x2)) O (CHead d k t1) +c0)).(\lambda (H9: (arity g (CHead d k t1) x1 (asucc g b))).(K_ind (\lambda +(k0: K).((arity g (CHead d k0 t1) x1 (asucc g b)) \to ((drop (r k0 (plus i +x2)) O d c0) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d0 u0 (asucc g b))))))))) (\lambda (b0: B).(\lambda (H10: +(arity g (CHead d (Bind b0) t1) x1 (asucc g b))).(\lambda (H11: (drop (r +(Bind b0) (plus i x2)) O d c0)).(ex2_3_intro C T nat (\lambda (d0: +C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda +(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) +(CHead d (Bind b0) t1) x1 (S x2) (eq_ind nat (S (plus i x2)) (\lambda (n: +nat).(drop n O (CHead d (Bind b0) t1) c0)) (drop_drop (Bind b0) (plus i x2) d +c0 H11 t1) (plus i (S x2)) (plus_n_Sm i x2)) H10)))) (\lambda (f: F).(\lambda +(H10: (arity g (CHead d (Flat f) t1) x1 (asucc g b))).(\lambda (H11: (drop (r +(Flat f) (plus i x2)) O d c0)).(let H12 \def (IHd H11 (arity_cimp_conf g +(CHead d (Flat f) t1) x1 (asucc g b) H10 d (cimp_flat_sx f d t1))) in +(ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop +(plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: +nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: C).(\lambda +(_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: +C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) +(\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: nat).(\lambda (H13: (drop +(plus i x5) O x3 c0)).(\lambda (H14: (arity g x3 x4 (asucc g +b))).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d0 u0 (asucc g b))))) x3 x4 x5 H13 H14)))))) H12))))) k H9 +(drop_gen_drop k d c0 t1 (plus i x2) H8)))))))) x0 H6 H7)))))) H5)))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda (_: ((\forall (i: nat).(\forall (b: A).((aprem i (asucc g a0) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/definitions.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/definitions.ma index 1b9906dbb..e89081ac9 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/definitions.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/definitions.ma @@ -58,3 +58,5 @@ include "LambdaDelta-1/ex1/defs.ma". include "LambdaDelta-1/csubt/defs.ma". +include "LambdaDelta-1/wf3/defs.ma". + diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/spare.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/spare.ma index 6022d3fa9..f40cf08fe 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/spare.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/spare.ma @@ -191,218 +191,6 @@ ts0 (\lambda (t1: TList).(tys3 g c t1 u0)) H2 ts H6) in (let H10 \def (eq_ind T t0 (\lambda (t1: T).(ty3 g c t1 u0)) H1 t H7) in (conj (ty3 g c t u0) (tys3 g c ts u0) H10 H9)))))) H5))))))))) y u H0))) H)))))). -theorem ty3_getl_subst0: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (u: T).((ty3 g c t -u) \to (\forall (v0: T).(\forall (t0: T).(\forall (i: nat).((subst0 i v0 t -t0) \to (\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c (CHead d -(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: -(ty3 g c t u)).(ty3_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: -T).(\forall (v0: T).(\forall (t2: T).(\forall (i: nat).((subst0 i v0 t0 t2) -\to (\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d -(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v w)))))))))))))) (\lambda -(c0: C).(\lambda (t2: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 -t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: -nat).((subst0 i v0 t2 t1) \to (\forall (b: B).(\forall (d: C).(\forall (v: -T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v -w))))))))))))).(\lambda (u0: T).(\lambda (t1: T).(\lambda (_: (ty3 g c0 u0 -t1)).(\lambda (H3: ((\forall (v0: T).(\forall (t3: T).(\forall (i: -nat).((subst0 i v0 u0 t3) \to (\forall (b: B).(\forall (d: C).(\forall (v: -T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v -w))))))))))))).(\lambda (_: (pc3 c0 t1 t2)).(\lambda (v0: T).(\lambda (t3: -T).(\lambda (i: nat).(\lambda (H5: (subst0 i v0 u0 t3)).(\lambda (b: -B).(\lambda (d: C).(\lambda (v: T).(\lambda (H6: (getl i c0 (CHead d (Bind b) -v))).(H3 v0 t3 i H5 b d v H6))))))))))))))))))) (\lambda (c0: C).(\lambda (m: -nat).(\lambda (v0: T).(\lambda (t0: T).(\lambda (i: nat).(\lambda (H0: -(subst0 i v0 (TSort m) t0)).(\lambda (b: B).(\lambda (d: C).(\lambda (v: -T).(\lambda (_: (getl i c0 (CHead d (Bind b) v))).(subst0_gen_sort v0 t0 i m -H0 (ex T (\lambda (w: T).(ty3 g d v w)))))))))))))) (\lambda (n: -nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n -c0 (CHead d (Bind Abbr) u0))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u0 -t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: -nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall (d0: C).(\forall (v: -T).((getl i d (CHead d0 (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d0 v -w))))))))))))).(\lambda (v0: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda -(H3: (subst0 i v0 (TLRef n) t1)).(\lambda (b: B).(\lambda (d0: C).(\lambda -(v: T).(\lambda (H4: (getl i c0 (CHead d0 (Bind b) v))).(and_ind (eq nat n i) -(eq T t1 (lift (S n) O v0)) (ex T (\lambda (w: T).(ty3 g d0 v w))) (\lambda -(H5: (eq nat n i)).(\lambda (_: (eq T t1 (lift (S n) O v0))).(let H7 \def -(eq_ind_r nat i (\lambda (n0: nat).(getl n0 c0 (CHead d0 (Bind b) v))) H4 n -H5) in (let H8 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c1: C).(getl -n c0 c1)) H0 (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n -H0 (CHead d0 (Bind b) v) H7)) in (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) u0) (CHead d0 (Bind b) -v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind b) v) 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) u0) (CHead d0 (Bind b) v) -(getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in -((let H11 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: -C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t2) \Rightarrow t2])) -(CHead d (Bind Abbr) u0) (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind -Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in (\lambda (H12: (eq B Abbr -b)).(\lambda (H13: (eq C d d0)).(let H14 \def (eq_ind_r T v (\lambda (t2: -T).(getl n c0 (CHead d0 (Bind b) t2))) H8 u0 H11) in (eq_ind T u0 (\lambda -(t2: T).(ex T (\lambda (w: T).(ty3 g d0 t2 w)))) (let H15 \def (eq_ind_r C d0 -(\lambda (c1: C).(getl n c0 (CHead c1 (Bind b) u0))) H14 d H13) in (eq_ind C -d (\lambda (c1: C).(ex T (\lambda (w: T).(ty3 g c1 u0 w)))) (let H16 \def -(eq_ind_r B b (\lambda (b0: B).(getl n c0 (CHead d (Bind b0) u0))) H15 Abbr -H12) in (ex_intro T (\lambda (w: T).(ty3 g d u0 w)) t0 H1)) d0 H13)) v -H11))))) H10)) H9)))))) (subst0_gen_lref v0 t1 i n H3)))))))))))))))))) -(\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda -(H0: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t0: T).(\lambda (H1: -(ty3 g d u0 t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: -nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall (d0: C).(\forall (v: -T).((getl i d (CHead d0 (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d0 v -w))))))))))))).(\lambda (v0: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda -(H3: (subst0 i v0 (TLRef n) t1)).(\lambda (b: B).(\lambda (d0: C).(\lambda -(v: T).(\lambda (H4: (getl i c0 (CHead d0 (Bind b) v))).(and_ind (eq nat n i) -(eq T t1 (lift (S n) O v0)) (ex T (\lambda (w: T).(ty3 g d0 v w))) (\lambda -(H5: (eq nat n i)).(\lambda (_: (eq T t1 (lift (S n) O v0))).(let H7 \def -(eq_ind_r nat i (\lambda (n0: nat).(getl n0 c0 (CHead d0 (Bind b) v))) H4 n -H5) in (let H8 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c1: C).(getl -n c0 c1)) H0 (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abst) u0) n -H0 (CHead d0 (Bind b) v) H7)) in (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 Abst) u0) (CHead d0 (Bind b) -v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in -((let H10 \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 b0) \Rightarrow b0 | (Flat _) -\Rightarrow Abst])])) (CHead d (Bind Abst) u0) (CHead d0 (Bind b) v) -(getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in -((let H11 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: -C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t2) \Rightarrow t2])) -(CHead d (Bind Abst) u0) (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind -Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in (\lambda (H12: (eq B Abst -b)).(\lambda (H13: (eq C d d0)).(let H14 \def (eq_ind_r T v (\lambda (t2: -T).(getl n c0 (CHead d0 (Bind b) t2))) H8 u0 H11) in (eq_ind T u0 (\lambda -(t2: T).(ex T (\lambda (w: T).(ty3 g d0 t2 w)))) (let H15 \def (eq_ind_r C d0 -(\lambda (c1: C).(getl n c0 (CHead c1 (Bind b) u0))) H14 d H13) in (eq_ind C -d (\lambda (c1: C).(ex T (\lambda (w: T).(ty3 g c1 u0 w)))) (let H16 \def -(eq_ind_r B b (\lambda (b0: B).(getl n c0 (CHead d (Bind b0) u0))) H15 Abst -H12) in (ex_intro T (\lambda (w: T).(ty3 g d u0 w)) t0 H1)) d0 H13)) v -H11))))) H10)) H9)))))) (subst0_gen_lref v0 t1 i n H3)))))))))))))))))) -(\lambda (c0: C).(\lambda (u0: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 u0 -t0)).(\lambda (H1: ((\forall (v0: T).(\forall (t1: T).(\forall (i: -nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall (d: C).(\forall (v: -T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v -w))))))))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: -(ty3 g (CHead c0 (Bind b) u0) t1 t2)).(\lambda (H3: ((\forall (v0: -T).(\forall (t3: T).(\forall (i: nat).((subst0 i v0 t1 t3) \to (\forall (b0: -B).(\forall (d: C).(\forall (v: T).((getl i (CHead c0 (Bind b) u0) (CHead d -(Bind b0) v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))).(\lambda -(v0: T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead -(Bind b) u0 t1) t3)).(\lambda (b0: B).(\lambda (d: C).(\lambda (v: -T).(\lambda (H5: (getl i c0 (CHead d (Bind b0) v))).(or3_ind (ex2 T (\lambda -(u2: T).(eq T t3 (THead (Bind b) u2 t1))) (\lambda (u2: T).(subst0 i v0 u0 -u2))) (ex2 T (\lambda (t4: T).(eq T t3 (THead (Bind b) u0 t4))) (\lambda (t4: -T).(subst0 (s (Bind b) i) v0 t1 t4))) (ex3_2 T T (\lambda (u2: T).(\lambda -(t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i v0 u0 u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Bind b) -i) v0 t1 t4)))) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (H6: (ex2 T -(\lambda (u2: T).(eq T t3 (THead (Bind b) u2 t1))) (\lambda (u2: T).(subst0 i -v0 u0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Bind b) u2 t1))) -(\lambda (u2: T).(subst0 i v0 u0 u2)) (ex T (\lambda (w: T).(ty3 g d v w))) -(\lambda (x: T).(\lambda (_: (eq T t3 (THead (Bind b) x t1))).(\lambda (H8: -(subst0 i v0 u0 x)).(H1 v0 x i H8 b0 d v H5)))) H6)) (\lambda (H6: (ex2 T -(\lambda (t4: T).(eq T t3 (THead (Bind b) u0 t4))) (\lambda (t4: T).(subst0 -(s (Bind b) i) v0 t1 t4)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead (Bind -b) u0 t4))) (\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 t4)) (ex T (\lambda -(w: T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: (eq T t3 (THead (Bind b) -u0 x))).(\lambda (H8: (subst0 (s (Bind b) i) v0 t1 x)).(H3 v0 x (S i) H8 b0 d -v (getl_head (Bind b) i c0 (CHead d (Bind b0) v) H5 u0))))) H6)) (\lambda -(H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2 -t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 u0 u2))) (\lambda (_: -T).(\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 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).(subst0 i v0 u0 u2))) (\lambda (_: T).(\lambda (t4: -T).(subst0 (s (Bind b) i) v0 t1 t4))) (ex T (\lambda (w: T).(ty3 g d v w))) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T t3 (THead (Bind b) x0 -x1))).(\lambda (H8: (subst0 i v0 u0 x0)).(\lambda (_: (subst0 (s (Bind b) i) -v0 t1 x1)).(H1 v0 x0 i H8 b0 d v H5)))))) H6)) (subst0_gen_head (Bind b) v0 -u0 t1 t3 i H4)))))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda -(u0: T).(\lambda (_: (ty3 g c0 w u0)).(\lambda (H1: ((\forall (v0: -T).(\forall (t0: T).(\forall (i: nat).((subst0 i v0 w t0) \to (\forall (b: -B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d (Bind b) v)) \to (ex -T (\lambda (w0: T).(ty3 g d v w0))))))))))))).(\lambda (v: T).(\lambda (t0: -T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u0 t0))).(\lambda (H3: -((\forall (v0: T).(\forall (t1: T).(\forall (i: nat).((subst0 i v0 v t1) \to -(\forall (b: B).(\forall (d: C).(\forall (v1: T).((getl i c0 (CHead d (Bind -b) v1)) \to (ex T (\lambda (w0: T).(ty3 g d v1 w0))))))))))))).(\lambda (v0: -T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead (Flat -Appl) w v) t1)).(\lambda (b: B).(\lambda (d: C).(\lambda (v1: T).(\lambda -(H5: (getl i c0 (CHead d (Bind b) v1))).(or3_ind (ex2 T (\lambda (u2: T).(eq -T t1 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i v0 w u2))) (ex2 T -(\lambda (t2: T).(eq T t1 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 -(s (Flat Appl) i) v0 v t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq -T t1 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i -v0 w u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v -t2)))) (ex T (\lambda (w0: T).(ty3 g d v1 w0))) (\lambda (H6: (ex2 T (\lambda -(u2: T).(eq T t1 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i v0 w -u2)))).(ex2_ind T (\lambda (u2: T).(eq T t1 (THead (Flat Appl) u2 v))) -(\lambda (u2: T).(subst0 i v0 w u2)) (ex T (\lambda (w0: T).(ty3 g d v1 w0))) -(\lambda (x: T).(\lambda (_: (eq T t1 (THead (Flat Appl) x v))).(\lambda (H8: -(subst0 i v0 w x)).(H1 v0 x i H8 b d v1 H5)))) H6)) (\lambda (H6: (ex2 T -(\lambda (t2: T).(eq T t1 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 -(s (Flat Appl) i) v0 v t2)))).(ex2_ind T (\lambda (t2: T).(eq T t1 (THead -(Flat Appl) w t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2)) (ex -T (\lambda (w0: T).(ty3 g d v1 w0))) (\lambda (x: T).(\lambda (_: (eq T t1 -(THead (Flat Appl) w x))).(\lambda (H8: (subst0 (s (Flat Appl) i) v0 v -x)).(H3 v0 x (s (Flat Appl) i) H8 b d v1 H5)))) H6)) (\lambda (H6: (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t1 (THead (Flat Appl) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t1 (THead (Flat Appl) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2))) (ex T (\lambda (w0: -T).(ty3 g d v1 w0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T t1 -(THead (Flat Appl) x0 x1))).(\lambda (_: (subst0 i v0 w x0)).(\lambda (H9: -(subst0 (s (Flat Appl) i) v0 v x1)).(H3 v0 x1 (s (Flat Appl) i) H9 b d v1 -H5)))))) H6)) (subst0_gen_head (Flat Appl) v0 w v t1 i H4))))))))))))))))))) -(\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 -t2)).(\lambda (H1: ((\forall (v0: T).(\forall (t0: T).(\forall (i: -nat).((subst0 i v0 t1 t0) \to (\forall (b: B).(\forall (d: C).(\forall (v: -T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v -w))))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (H3: -((\forall (v0: T).(\forall (t3: T).(\forall (i: nat).((subst0 i v0 t2 t3) \to -(\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d (Bind b) -v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))).(\lambda (v0: -T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead (Flat -Cast) t2 t1) t3)).(\lambda (b: B).(\lambda (d: C).(\lambda (v: T).(\lambda -(H5: (getl i c0 (CHead d (Bind b) v))).(or3_ind (ex2 T (\lambda (u2: T).(eq T -t3 (THead (Flat Cast) u2 t1))) (\lambda (u2: T).(subst0 i v0 t2 u2))) (ex2 T -(\lambda (t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) (\lambda (t4: -T).(subst0 (s (Flat Cast) i) v0 t1 t4))) (ex3_2 T T (\lambda (u2: T).(\lambda -(t4: T).(eq T t3 (THead (Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i v0 t2 u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat -Cast) i) v0 t1 t4)))) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (H6: -(ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Cast) u2 t1))) (\lambda (u2: -T).(subst0 i v0 t2 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat -Cast) u2 t1))) (\lambda (u2: T).(subst0 i v0 t2 u2)) (ex T (\lambda (w: -T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: (eq T t3 (THead (Flat Cast) x -t1))).(\lambda (H8: (subst0 i v0 t2 x)).(H3 v0 x i H8 b d v H5)))) H6)) -(\lambda (H6: (ex2 T (\lambda (t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) -(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 t4)))).(ex2_ind T (\lambda -(t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) (\lambda (t4: T).(subst0 (s -(Flat Cast) i) v0 t1 t4)) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (x: -T).(\lambda (_: (eq T t3 (THead (Flat Cast) t2 x))).(\lambda (H8: (subst0 (s -(Flat Cast) i) v0 t1 x)).(H1 v0 x (s (Flat Cast) i) H8 b d v H5)))) H6)) -(\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 t2 u2))) -(\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 -t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 t2 u2))) -(\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 t4))) (ex T -(\lambda (w: T).(ty3 g d v w))) (\lambda (x0: T).(\lambda (x1: T).(\lambda -(_: (eq T t3 (THead (Flat Cast) x0 x1))).(\lambda (H8: (subst0 i v0 t2 -x0)).(\lambda (_: (subst0 (s (Flat Cast) i) v0 t1 x1)).(H3 v0 x0 i H8 b d v -H5)))))) H6)) (subst0_gen_head (Flat Cast) v0 t2 t1 t3 i H4)))))))))))))))))) -c t u H))))). - theorem ty3_gen_appl_nf2: \forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (v: T).(\forall (x: T).((ty3 g c (THead (Flat Appl) w v) x) \to (ex4_2 T T (\lambda (u: @@ -667,644 +455,6 @@ j O)).(\lambda (_: (eq T x (TLRef j))).(lt_x_O j H6 (lt i j)))) H5)) (\lambda (le (plus O (S i)) j)).(\lambda (_: (eq T x (TLRef (minus j (S i))))).H6)) H5)) H4))))) H2))))))))). -inductive wf3 (g: G): C \to (C \to Prop) \def -| wf3_sort: \forall (m: nat).(wf3 g (CSort m) (CSort m)) -| wf3_bind: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: -T).(\forall (t: T).((ty3 g c1 u t) \to (\forall (b: B).(wf3 g (CHead c1 (Bind -b) u) (CHead c2 (Bind b) u)))))))) -| wf3_void: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: -T).(((\forall (t: T).((ty3 g c1 u t) \to False))) \to (\forall (b: B).(wf3 g -(CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)))))))) -| wf3_flat: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: -T).(\forall (f: F).(wf3 g (CHead c1 (Flat f) u) c2))))). - -theorem wf3_gen_sort1: - \forall (g: G).(\forall (x: C).(\forall (m: nat).((wf3 g (CSort m) x) \to -(eq C x (CSort m))))) -\def - \lambda (g: G).(\lambda (x: C).(\lambda (m: nat).(\lambda (H: (wf3 g (CSort -m) x)).(insert_eq C (CSort m) (\lambda (c: C).(wf3 g c x)) (\lambda (c: -C).(eq C x c)) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda -(c: C).(\lambda (c0: C).((eq C c (CSort m)) \to (eq C c0 c)))) (\lambda (m0: -nat).(\lambda (H1: (eq C (CSort m0) (CSort m))).(let H2 \def (f_equal C nat -(\lambda (e: C).(match e in C return (\lambda (_: C).nat) with [(CSort n) -\Rightarrow n | (CHead _ _ _) \Rightarrow m0])) (CSort m0) (CSort m) H1) in -(eq_ind_r nat m (\lambda (n: nat).(eq C (CSort n) (CSort n))) (refl_equal C -(CSort m)) m0 H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (wf3 g c1 -c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2 c1)))).(\lambda (u: -T).(\lambda (t: T).(\lambda (_: (ty3 g c1 u t)).(\lambda (b: B).(\lambda (H4: -(eq C (CHead c1 (Bind b) u) (CSort m))).(let H5 \def (eq_ind C (CHead c1 -(Bind b) u) (\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop) with -[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort m) -H4) in (False_ind (eq C (CHead c2 (Bind b) u) (CHead c1 (Bind b) u)) -H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (wf3 g c1 -c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2 c1)))).(\lambda (u: -T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u t) \to False)))).(\lambda (b: -B).(\lambda (H4: (eq C (CHead c1 (Bind b) u) (CSort m))).(let H5 \def (eq_ind -C (CHead c1 (Bind b) u) (\lambda (ee: C).(match ee in C return (\lambda (_: -C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow -True])) I (CSort m) H4) in (False_ind (eq C (CHead c2 (Bind Void) (TSort O)) -(CHead c1 (Bind b) u)) H5)))))))))) (\lambda (c1: C).(\lambda (c2: -C).(\lambda (_: (wf3 g c1 c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C -c2 c1)))).(\lambda (u: T).(\lambda (f: F).(\lambda (H3: (eq C (CHead c1 (Flat -f) u) (CSort m))).(let H4 \def (eq_ind C (CHead c1 (Flat f) u) (\lambda (ee: -C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow -False | (CHead _ _ _) \Rightarrow True])) I (CSort m) H3) in (False_ind (eq C -c2 (CHead c1 (Flat f) u)) H4))))))))) y x H0))) H)))). - -theorem wf3_gen_bind1: - \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (b: -B).((wf3 g (CHead c1 (Bind b) v) x) \to (or (ex3_2 C T (\lambda (c2: -C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2: C).(\lambda -(_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 -C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O)))) (\lambda (c2: -C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to -False)))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (b: -B).(\lambda (H: (wf3 g (CHead c1 (Bind b) v) x)).(insert_eq C (CHead c1 (Bind -b) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(or (ex3_2 C T (\lambda -(c2: C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2: -C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 -v w)))) (ex3 C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O)))) -(\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v -w) \to False)))))) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g -(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead c1 (Bind b) v)) \to (or -(ex3_2 C T (\lambda (c2: C).(\lambda (_: T).(eq C c0 (CHead c2 (Bind b) v)))) -(\lambda (c2: C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: -T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2: C).(eq C c0 (CHead c2 (Bind Void) -(TSort O)))) (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: -T).((ty3 g c1 v w) \to False)))))))) (\lambda (m: nat).(\lambda (H1: (eq C -(CSort m) (CHead c1 (Bind b) v))).(let H2 \def (eq_ind C (CSort m) (\lambda -(ee: C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _) -\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead c1 (Bind b) v) -H1) in (False_ind (or (ex3_2 C T (\lambda (c2: C).(\lambda (_: T).(eq C -(CSort m) (CHead c2 (Bind b) v)))) (\lambda (c2: C).(\lambda (_: T).(wf3 g c1 -c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2: -C).(eq C (CSort m) (CHead c2 (Bind Void) (TSort O)))) (\lambda (c2: C).(wf3 g -c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False))))) H2)))) -(\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: -(((eq C c0 (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda (c3: -C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: -C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 -v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) -(\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v -w) \to False)))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H3: (ty3 g c0 -u t)).(\lambda (b0: B).(\lambda (H4: (eq C (CHead c0 (Bind b0) u) (CHead c1 -(Bind b) v))).(let H5 \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 b0) u) (CHead c1 (Bind b) v) H4) in ((let H6 \def -(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with -[(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow (match k in K return -(\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow -b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let H7 \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 -b0) u) (CHead c1 (Bind b) v) H4) in (\lambda (H8: (eq B b0 b)).(\lambda (H9: -(eq C c0 c1)).(eq_ind_r B b (\lambda (b1: B).(or (ex3_2 C T (\lambda (c3: -C).(\lambda (_: T).(eq C (CHead c2 (Bind b1) u) (CHead c3 (Bind b) v)))) -(\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: -T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind b1) u) -(CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda -(_: C).(\forall (w: T).((ty3 g c1 v w) \to False)))))) (let H10 \def (eq_ind -T u (\lambda (t0: T).(ty3 g c0 t0 t)) H3 v H7) in (eq_ind_r T v (\lambda (t0: -T).(or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind b) -t0) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) -(\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq -C (CHead c2 (Bind b) t0) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: -C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to -False)))))) (let H11 \def (eq_ind C c0 (\lambda (c: C).(ty3 g c v t)) H10 c1 -H9) in (let H12 \def (eq_ind C c0 (\lambda (c: C).((eq C c (CHead c1 (Bind b) -v)) \to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 -(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: -C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead -c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: -C).(\forall (w: T).((ty3 g c1 v w) \to False))))))) H2 c1 H9) in (let H13 -\def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H9) in (or_introl -(ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind b) v) -(CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) -(\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq -C (CHead c2 (Bind b) v) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: -C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to -False)))) (ex3_2_intro C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2 -(Bind b) v) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g -c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w))) c2 t (refl_equal C -(CHead c2 (Bind b) v)) H13 H11))))) u H7)) b0 H8)))) H6)) H5))))))))))) -(\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: -(((eq C c0 (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda (c3: -C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: -C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 -v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) -(\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v -w) \to False)))))))).(\lambda (u: T).(\lambda (H3: ((\forall (t: T).((ty3 g -c0 u t) \to False)))).(\lambda (b0: B).(\lambda (H4: (eq C (CHead c0 (Bind -b0) u) (CHead c1 (Bind b) v))).(let H5 \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 b0) u) (CHead c1 (Bind b) v) -H4) in ((let H6 \def (f_equal C B (\lambda (e: C).(match e in C return -(\lambda (_: C).B) with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow -(match k in K return (\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | -(Flat _) \Rightarrow b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) -in ((let H7 \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 (Bind b0) u) (CHead c1 (Bind b) v) H4) in (\lambda (_: (eq B b0 -b)).(\lambda (H9: (eq C c0 c1)).(let H10 \def (eq_ind T u (\lambda (t: -T).(\forall (t0: T).((ty3 g c0 t t0) \to False))) H3 v H7) in (let H11 \def -(eq_ind C c0 (\lambda (c: C).(\forall (t: T).((ty3 g c v t) \to False))) H10 -c1 H9) in (let H12 \def (eq_ind C c0 (\lambda (c: C).((eq C c (CHead c1 (Bind -b) v)) \to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 -(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: -C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead -c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: -C).(\forall (w: T).((ty3 g c1 v w) \to False))))))) H2 c1 H9) in (let H13 -\def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H9) in (or_intror -(ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind Void) -(TSort O)) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g -c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda -(c3: C).(eq C (CHead c2 (Bind Void) (TSort O)) (CHead c3 (Bind Void) (TSort -O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g -c1 v w) \to False)))) (ex3_intro C (\lambda (c3: C).(eq C (CHead c2 (Bind -Void) (TSort O)) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g -c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False))) c2 -(refl_equal C (CHead c2 (Bind Void) (TSort O))) H13 H11))))))))) H6)) -H5)))))))))) (\lambda (c0: C).(\lambda (c2: C).(\lambda (_: (wf3 g c0 -c2)).(\lambda (_: (((eq C c0 (CHead c1 (Bind b) v)) \to (or (ex3_2 C T -(\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda -(c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 -g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort -O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g -c1 v w) \to False)))))))).(\lambda (u: T).(\lambda (f: F).(\lambda (H3: (eq C -(CHead c0 (Flat f) u) (CHead c1 (Bind b) v))).(let H4 \def (eq_ind C (CHead -c0 (Flat f) u) (\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop) -with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k in K -return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) -\Rightarrow True])])) I (CHead c1 (Bind b) v) H3) in (False_ind (or (ex3_2 C -T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda -(c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 -g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort -O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g -c1 v w) \to False))))) H4))))))))) y x H0))) H)))))). - -theorem wf3_gen_flat1: - \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (f: -F).((wf3 g (CHead c1 (Flat f) v) x) \to (wf3 g c1 x)))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (f: -F).(\lambda (H: (wf3 g (CHead c1 (Flat f) v) x)).(insert_eq C (CHead c1 (Flat -f) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(wf3 g c1 x)) (\lambda (y: -C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda (c: C).(\lambda (c0: -C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c0)))) (\lambda (m: -nat).(\lambda (H1: (eq C (CSort m) (CHead c1 (Flat f) v))).(let H2 \def -(eq_ind C (CSort m) (\lambda (ee: C).(match ee in C return (\lambda (_: -C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow -False])) I (CHead c1 (Flat f) v) H1) in (False_ind (wf3 g c1 (CSort m)) -H2)))) (\lambda (c0: C).(\lambda (c2: C).(\lambda (_: (wf3 g c0 c2)).(\lambda -(_: (((eq C c0 (CHead c1 (Flat f) v)) \to (wf3 g c1 c2)))).(\lambda (u: -T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (b: B).(\lambda (H4: -(eq C (CHead c0 (Bind b) u) (CHead c1 (Flat f) v))).(let H5 \def (eq_ind C -(CHead c0 (Bind b) u) (\lambda (ee: C).(match ee 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 c1 (Flat f) v) H4) in (False_ind (wf3 g c1 -(CHead c2 (Bind b) u)) H5))))))))))) (\lambda (c0: C).(\lambda (c2: -C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_: (((eq C c0 (CHead c1 (Flat f) v)) -\to (wf3 g c1 c2)))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c0 -u t) \to False)))).(\lambda (b: B).(\lambda (H4: (eq C (CHead c0 (Bind b) u) -(CHead c1 (Flat f) v))).(let H5 \def (eq_ind C (CHead c0 (Bind b) u) (\lambda -(ee: C).(match ee 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 c1 (Flat f) v) H4) in (False_ind (wf3 g c1 (CHead c2 -(Bind Void) (TSort O))) H5)))))))))) (\lambda (c0: C).(\lambda (c2: -C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 (Flat f) -v)) \to (wf3 g c1 c2)))).(\lambda (u: T).(\lambda (f0: F).(\lambda (H3: (eq C -(CHead c0 (Flat f0) u) (CHead c1 (Flat f) v))).(let H4 \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 (Flat f0) u) (CHead -c1 (Flat f) v) H3) in ((let H5 \def (f_equal C F (\lambda (e: C).(match e in -C return (\lambda (_: C).F) with [(CSort _) \Rightarrow f0 | (CHead _ k _) -\Rightarrow (match k in K return (\lambda (_: K).F) with [(Bind _) -\Rightarrow f0 | (Flat f1) \Rightarrow f1])])) (CHead c0 (Flat f0) u) (CHead -c1 (Flat f) v) H3) in ((let H6 \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 (Flat f0) u) (CHead c1 (Flat f) v) H3) in (\lambda -(_: (eq F f0 f)).(\lambda (H8: (eq C c0 c1)).(let H9 \def (eq_ind C c0 -(\lambda (c: C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c2))) H2 c1 H8) -in (let H10 \def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H8) in -H10))))) H5)) H4))))))))) y x H0))) H)))))). - -theorem wf3_gen_head2: - \forall (g: G).(\forall (x: C).(\forall (c: C).(\forall (v: T).(\forall (k: -K).((wf3 g x (CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))))) -\def - \lambda (g: G).(\lambda (x: C).(\lambda (c: C).(\lambda (v: T).(\lambda (k: -K).(\lambda (H: (wf3 g x (CHead c k v))).(insert_eq C (CHead c k v) (\lambda -(c0: C).(wf3 g x c0)) (\lambda (_: C).(ex B (\lambda (b: B).(eq K k (Bind -b))))) (\lambda (y: C).(\lambda (H0: (wf3 g x y)).(wf3_ind g (\lambda (_: -C).(\lambda (c1: C).((eq C c1 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K -k (Bind b))))))) (\lambda (m: nat).(\lambda (H1: (eq C (CSort m) (CHead c k -v))).(let H2 \def (eq_ind C (CSort m) (\lambda (ee: C).(match ee in C return -(\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) -\Rightarrow False])) I (CHead c k v) H1) in (False_ind (ex B (\lambda (b: -B).(eq K k (Bind b)))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: -(wf3 g c1 c2)).(\lambda (H2: (((eq C c2 (CHead c k v)) \to (ex B (\lambda (b: -B).(eq K k (Bind b))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H3: (ty3 -g c1 u t)).(\lambda (b: B).(\lambda (H4: (eq C (CHead c2 (Bind b) u) (CHead c -k v))).(let H5 \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 b) u) (CHead c k v) H4) in ((let H6 \def -(f_equal C K (\lambda (e: C).(match e in C return (\lambda (_: C).K) with -[(CSort _) \Rightarrow (Bind b) | (CHead _ k0 _) \Rightarrow k0])) (CHead c2 -(Bind b) u) (CHead c k v) H4) in ((let H7 \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 b) u) (CHead c k v) H4) in -(\lambda (H8: (eq K (Bind b) k)).(\lambda (H9: (eq C c2 c)).(let H10 \def -(eq_ind T u (\lambda (t0: T).(ty3 g c1 t0 t)) H3 v H7) in (let H11 \def -(eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex B (\lambda -(b0: B).(eq K k (Bind b0)))))) H2 c H9) in (let H12 \def (eq_ind C c2 -(\lambda (c0: C).(wf3 g c1 c0)) H1 c H9) in (let H13 \def (eq_ind_r K k -(\lambda (k0: K).((eq C c (CHead c k0 v)) \to (ex B (\lambda (b0: B).(eq K k0 -(Bind b0)))))) H11 (Bind b) H8) in (eq_ind K (Bind b) (\lambda (k0: K).(ex B -(\lambda (b0: B).(eq K k0 (Bind b0))))) (ex_intro B (\lambda (b0: B).(eq K -(Bind b) (Bind b0))) b (refl_equal K (Bind b))) k H8)))))))) H6)) -H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 -c2)).(\lambda (H2: (((eq C c2 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K -k (Bind b))))))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u -t) \to False)))).(\lambda (_: B).(\lambda (H4: (eq C (CHead c2 (Bind Void) -(TSort O)) (CHead c k v))).(let H5 \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 Void) (TSort O)) (CHead c k v) H4) in -((let H6 \def (f_equal C K (\lambda (e: C).(match e in C return (\lambda (_: -C).K) with [(CSort _) \Rightarrow (Bind Void) | (CHead _ k0 _) \Rightarrow -k0])) (CHead c2 (Bind Void) (TSort O)) (CHead c k v) H4) in ((let H7 \def -(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with -[(CSort _) \Rightarrow (TSort O) | (CHead _ _ t) \Rightarrow t])) (CHead c2 -(Bind Void) (TSort O)) (CHead c k v) H4) in (\lambda (H8: (eq K (Bind Void) -k)).(\lambda (H9: (eq C c2 c)).(let H10 \def (eq_ind C c2 (\lambda (c0: -C).((eq C c0 (CHead c k v)) \to (ex B (\lambda (b0: B).(eq K k (Bind b0)))))) -H2 c H9) in (let H11 \def (eq_ind C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c -H9) in (let H12 \def (eq_ind_r K k (\lambda (k0: K).((eq C c (CHead c k0 v)) -\to (ex B (\lambda (b0: B).(eq K k0 (Bind b0)))))) H10 (Bind Void) H8) in -(eq_ind K (Bind Void) (\lambda (k0: K).(ex B (\lambda (b0: B).(eq K k0 (Bind -b0))))) (let H13 \def (eq_ind_r T v (\lambda (t: T).((eq C c (CHead c (Bind -Void) t)) \to (ex B (\lambda (b0: B).(eq K (Bind Void) (Bind b0)))))) H12 -(TSort O) H7) in (ex_intro B (\lambda (b0: B).(eq K (Bind Void) (Bind b0))) -Void (refl_equal K (Bind Void)))) k H8))))))) H6)) H5)))))))))) (\lambda (c1: -C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C c2 -(CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))).(\lambda (_: -T).(\lambda (_: F).(\lambda (H3: (eq C c2 (CHead c k v))).(let H4 \def -(f_equal C C (\lambda (e: C).e) c2 (CHead c k v) H3) in (let H5 \def (eq_ind -C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex B (\lambda (b: B).(eq -K k (Bind b)))))) H2 (CHead c k v) H4) in (let H6 \def (eq_ind C c2 (\lambda -(c0: C).(wf3 g c1 c0)) H1 (CHead c k v) H4) in (H5 (refl_equal C (CHead c k -v))))))))))))) x y H0))) H)))))). - -theorem wf3_mono: - \forall (g: G).(\forall (c: C).(\forall (c1: C).((wf3 g c c1) \to (\forall -(c2: C).((wf3 g c c2) \to (eq C c1 c2)))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (c1: C).(\lambda (H: (wf3 g c -c1)).(wf3_ind g (\lambda (c0: C).(\lambda (c2: C).(\forall (c3: C).((wf3 g c0 -c3) \to (eq C c2 c3))))) (\lambda (m: nat).(\lambda (c2: C).(\lambda (H0: -(wf3 g (CSort m) c2)).(let H_y \def (wf3_gen_sort1 g c2 m H0) in (eq_ind_r C -(CSort m) (\lambda (c0: C).(eq C (CSort m) c0)) (refl_equal C (CSort m)) c2 -H_y))))) (\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2 -c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3 -c4))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H2: (ty3 g c2 u -t)).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g (CHead c2 (Bind b) -u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in (let H4 \def H_x in -(or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind -b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: -C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq C c0 (CHead -c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: -C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3 (Bind b) u) -c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead -c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda -(_: C).(\lambda (w: T).(ty3 g c2 u w))))).(ex3_2_ind C T (\lambda (c4: -C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4: -C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2 -u w))) (eq C (CHead c3 (Bind b) u) c0) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (H6: (eq C c0 (CHead x0 (Bind b) u))).(\lambda (H7: (wf3 g c2 -x0)).(\lambda (_: (ty3 g c2 u x1)).(eq_ind_r C (CHead x0 (Bind b) u) (\lambda -(c4: C).(eq C (CHead c3 (Bind b) u) c4)) (f_equal3 C K T C CHead c3 x0 (Bind -b) (Bind b) u u (H1 x0 H7) (refl_equal K (Bind b)) (refl_equal T u)) c0 -H6)))))) H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind -Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall -(w: T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0 -(CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda -(_: C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind b) -u) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void) (TSort -O)))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: ((\forall (w: T).((ty3 g c2 u -w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda (c4: -C).(eq C (CHead c3 (Bind b) u) c4)) (let H_x0 \def (H8 t H2) in (let H9 \def -H_x0 in (False_ind (eq C (CHead c3 (Bind b) u) (CHead x0 (Bind Void) (TSort -O))) H9))) c0 H6))))) H5)) H4))))))))))))) (\lambda (c2: C).(\lambda (c3: -C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4) -\to (eq C c3 c4))))).(\lambda (u: T).(\lambda (H2: ((\forall (t: T).((ty3 g -c2 u t) \to False)))).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g -(CHead c2 (Bind b) u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in -(let H4 \def H_x in (or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C -c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) -(\lambda (_: C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq -C c0 (CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) -(\lambda (_: C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3 -(Bind Void) (TSort O)) c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda -(_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: -T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2 u -w))))).(ex3_2_ind C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4 -(Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: -C).(\lambda (w: T).(ty3 g c2 u w))) (eq C (CHead c3 (Bind Void) (TSort O)) -c0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c0 (CHead x0 (Bind -b) u))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: (ty3 g c2 u x1)).(eq_ind_r -C (CHead x0 (Bind b) u) (\lambda (c4: C).(eq C (CHead c3 (Bind Void) (TSort -O)) c4)) (let H_x0 \def (H2 x1 H8) in (let H9 \def H_x0 in (False_ind (eq C -(CHead c3 (Bind Void) (TSort O)) (CHead x0 (Bind b) u)) H9))) c0 H6)))))) -H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind Void) -(TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall (w: -T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0 (CHead -c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: -C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind Void) -(TSort O)) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void) -(TSort O)))).(\lambda (H7: (wf3 g c2 x0)).(\lambda (_: ((\forall (w: T).((ty3 -g c2 u w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda -(c4: C).(eq C (CHead c3 (Bind Void) (TSort O)) c4)) (f_equal3 C K T C CHead -c3 x0 (Bind Void) (Bind Void) (TSort O) (TSort O) (H1 x0 H7) (refl_equal K -(Bind Void)) (refl_equal T (TSort O))) c0 H6))))) H5)) H4)))))))))))) -(\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1: -((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3 c4))))).(\lambda (u: -T).(\lambda (f: F).(\lambda (c0: C).(\lambda (H2: (wf3 g (CHead c2 (Flat f) -u) c0)).(let H_y \def (wf3_gen_flat1 g c2 c0 u f H2) in (H1 c0 H_y)))))))))) -c c1 H)))). - -theorem wf3_clear_conf: - \forall (c1: C).(\forall (c: C).((clear c1 c) \to (\forall (g: G).(\forall -(c2: C).((wf3 g c1 c2) \to (wf3 g c c2)))))) -\def - \lambda (c1: C).(\lambda (c: C).(\lambda (H: (clear c1 c)).(clear_ind -(\lambda (c0: C).(\lambda (c2: C).(\forall (g: G).(\forall (c3: C).((wf3 g c0 -c3) \to (wf3 g c2 c3)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: -T).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (wf3 g (CHead e (Bind b) u) -c2)).H0)))))) (\lambda (e: C).(\lambda (c0: C).(\lambda (_: (clear e -c0)).(\lambda (H1: ((\forall (g: G).(\forall (c2: C).((wf3 g e c2) \to (wf3 g -c0 c2)))))).(\lambda (f: F).(\lambda (u: T).(\lambda (g: G).(\lambda (c2: -C).(\lambda (H2: (wf3 g (CHead e (Flat f) u) c2)).(let H_y \def -(wf3_gen_flat1 g e c2 u f H2) in (H1 g c2 H_y))))))))))) c1 c H))). - -theorem clear_wf3_trans: - \forall (c1: C).(\forall (d1: C).((clear c1 d1) \to (\forall (g: G).(\forall -(d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda -(c2: C).(clear c2 d2)))))))) -\def - \lambda (c1: C).(\lambda (d1: C).(\lambda (H: (clear c1 d1)).(clear_ind -(\lambda (c: C).(\lambda (c0: C).(\forall (g: G).(\forall (d2: C).((wf3 g c0 -d2) \to (ex2 C (\lambda (c2: C).(wf3 g c c2)) (\lambda (c2: C).(clear c2 -d2)))))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(\lambda (g: -G).(\lambda (d2: C).(\lambda (H0: (wf3 g (CHead e (Bind b) u) d2)).(let H_x -\def (wf3_gen_bind1 g e d2 u b H0) in (let H1 \def H_x in (or_ind (ex3_2 C T -(\lambda (c2: C).(\lambda (_: T).(eq C d2 (CHead c2 (Bind b) u)))) (\lambda -(c2: C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g -e u w)))) (ex3 C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) (TSort O)))) -(\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: T).((ty3 g e u w) -\to False)))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) -(\lambda (c2: C).(clear c2 d2))) (\lambda (H2: (ex3_2 C T (\lambda (c2: -C).(\lambda (_: T).(eq C d2 (CHead c2 (Bind b) u)))) (\lambda (c2: -C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g e u -w))))).(ex3_2_ind C T (\lambda (c2: C).(\lambda (_: T).(eq C d2 (CHead c2 -(Bind b) u)))) (\lambda (c2: C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: -C).(\lambda (w: T).(ty3 g e u w))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e -(Bind b) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda (x0: C).(\lambda -(x1: T).(\lambda (H3: (eq C d2 (CHead x0 (Bind b) u))).(\lambda (H4: (wf3 g e -x0)).(\lambda (H5: (ty3 g e u x1)).(eq_ind_r C (CHead x0 (Bind b) u) (\lambda -(c: C).(ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) (\lambda (c2: -C).(clear c2 c)))) (ex_intro2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) -c2)) (\lambda (c2: C).(clear c2 (CHead x0 (Bind b) u))) (CHead x0 (Bind b) u) -(wf3_bind g e x0 H4 u x1 H5 b) (clear_bind b x0 u)) d2 H3)))))) H2)) (\lambda -(H2: (ex3 C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) (TSort O)))) -(\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: T).((ty3 g e u w) -\to False))))).(ex3_ind C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) -(TSort O)))) (\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: -T).((ty3 g e u w) \to False))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind -b) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda (x0: C).(\lambda (H3: -(eq C d2 (CHead x0 (Bind Void) (TSort O)))).(\lambda (H4: (wf3 g e -x0)).(\lambda (H5: ((\forall (w: T).((ty3 g e u w) \to False)))).(eq_ind_r C -(CHead x0 (Bind Void) (TSort O)) (\lambda (c: C).(ex2 C (\lambda (c2: C).(wf3 -g (CHead e (Bind b) u) c2)) (\lambda (c2: C).(clear c2 c)))) (ex_intro2 C -(\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) (\lambda (c2: C).(clear c2 -(CHead x0 (Bind Void) (TSort O)))) (CHead x0 (Bind Void) (TSort O)) (wf3_void -g e x0 H4 u H5 b) (clear_bind Void x0 (TSort O))) d2 H3))))) H2)) H1))))))))) -(\lambda (e: C).(\lambda (c: C).(\lambda (_: (clear e c)).(\lambda (H1: -((\forall (g: G).(\forall (d2: C).((wf3 g c d2) \to (ex2 C (\lambda (c2: -C).(wf3 g e c2)) (\lambda (c2: C).(clear c2 d2)))))))).(\lambda (f: -F).(\lambda (u: T).(\lambda (g: G).(\lambda (d2: C).(\lambda (H2: (wf3 g c -d2)).(let H_x \def (H1 g d2 H2) in (let H3 \def H_x in (ex2_ind C (\lambda -(c2: C).(wf3 g e c2)) (\lambda (c2: C).(clear c2 d2)) (ex2 C (\lambda (c2: -C).(wf3 g (CHead e (Flat f) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda -(x: C).(\lambda (H4: (wf3 g e x)).(\lambda (H5: (clear x d2)).(ex_intro2 C -(\lambda (c2: C).(wf3 g (CHead e (Flat f) u) c2)) (\lambda (c2: C).(clear c2 -d2)) x (wf3_flat g e x H4 u f) H5)))) H3)))))))))))) c1 d1 H))). - -theorem wf3_getl_conf: - \forall (b: B).(\forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall -(v: T).((getl i c1 (CHead d1 (Bind b) v)) \to (\forall (g: G).(\forall (c2: -C).((wf3 g c1 c2) \to (\forall (w: T).((ty3 g d1 v w) \to (ex2 C (\lambda -(d2: C).(getl i c2 (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 -d2))))))))))))) -\def - \lambda (b: B).(\lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: -C).(\forall (d1: C).(\forall (v: T).((getl n c1 (CHead d1 (Bind b) v)) \to -(\forall (g: G).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (w: T).((ty3 g -d1 v w) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind b) v))) -(\lambda (d2: C).(wf3 g d1 d2))))))))))))) (\lambda (c1: C).(\lambda (d1: -C).(\lambda (v: T).(\lambda (H: (getl O c1 (CHead d1 (Bind b) v))).(\lambda -(g: G).(\lambda (c2: C).(\lambda (H0: (wf3 g c1 c2)).(\lambda (w: T).(\lambda -(H1: (ty3 g d1 v w)).(let H_y \def (wf3_clear_conf c1 (CHead d1 (Bind b) v) -(getl_gen_O c1 (CHead d1 (Bind b) v) H) g c2 H0) in (let H_x \def -(wf3_gen_bind1 g d1 c2 v b H_y) in (let H2 \def H_x in (or_ind (ex3_2 C T -(\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda -(c3: C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 -g d1 v w0)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort -O)))) (\lambda (c3: C).(wf3 g d1 c3)) (\lambda (_: C).(\forall (w0: T).((ty3 -g d1 v w0) \to False)))) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind -b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (H3: (ex3_2 C T (\lambda -(c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: -C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g d1 -v w0))))).(ex3_2_ind C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 -(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: -C).(\lambda (w0: T).(ty3 g d1 v w0))) (ex2 C (\lambda (d2: C).(getl O c2 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H4: (eq C c2 (CHead x0 (Bind b) v))).(\lambda -(H5: (wf3 g d1 x0)).(\lambda (_: (ty3 g d1 v x1)).(eq_ind_r C (CHead x0 (Bind -b) v) (\lambda (c: C).(ex2 C (\lambda (d2: C).(getl O c (CHead d2 (Bind b) -v))) (\lambda (d2: C).(wf3 g d1 d2)))) (ex_intro2 C (\lambda (d2: C).(getl O -(CHead x0 (Bind b) v) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)) -x0 (getl_refl b x0 v) H5) c2 H4)))))) H3)) (\lambda (H3: (ex3 C (\lambda (c3: -C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g d1 -c3)) (\lambda (_: C).(\forall (w0: T).((ty3 g d1 v w0) \to -False))))).(ex3_ind C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort -O)))) (\lambda (c3: C).(wf3 g d1 c3)) (\lambda (_: C).(\forall (w0: T).((ty3 -g d1 v w0) \to False))) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind b) -v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: C).(\lambda (H4: (eq C c2 -(CHead x0 (Bind Void) (TSort O)))).(\lambda (_: (wf3 g d1 x0)).(\lambda (H6: -((\forall (w0: T).((ty3 g d1 v w0) \to False)))).(eq_ind_r C (CHead x0 (Bind -Void) (TSort O)) (\lambda (c: C).(ex2 C (\lambda (d2: C).(getl O c (CHead d2 -(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H6 w H1) in -(let H7 \def H_x0 in (False_ind (ex2 C (\lambda (d2: C).(getl O (CHead x0 -(Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 -d2))) H7))) c2 H4))))) H3)) H2))))))))))))) (\lambda (n: nat).(\lambda (H: -((\forall (c1: C).(\forall (d1: C).(\forall (v: T).((getl n c1 (CHead d1 -(Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c1 c2) \to (\forall -(w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind -b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))))))))))).(\lambda (c1: C).(C_ind -(\lambda (c: C).(\forall (d1: C).(\forall (v: T).((getl (S n) c (CHead d1 -(Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c c2) \to (\forall -(w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 -(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))))))))) (\lambda (n0: -nat).(\lambda (d1: C).(\lambda (v: T).(\lambda (H0: (getl (S n) (CSort n0) -(CHead d1 (Bind b) v))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (wf3 g -(CSort n0) c2)).(\lambda (w: T).(\lambda (_: (ty3 g d1 v w)).(getl_gen_sort -n0 (S n) (CHead d1 (Bind b) v) H0 (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))))))))))))) (\lambda -(c: C).(\lambda (H0: ((\forall (d1: C).(\forall (v: T).((getl (S n) c (CHead -d1 (Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c c2) \to -(\forall (w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))))))))))))).(\lambda -(k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (v: T).(\lambda (H1: (getl -(S n) (CHead c k t) (CHead d1 (Bind b) v))).(\lambda (g: G).(\lambda (c2: -C).(\lambda (H2: (wf3 g (CHead c k t) c2)).(\lambda (w: T).(\lambda (H3: (ty3 -g d1 v w)).(K_ind (\lambda (k0: K).((wf3 g (CHead c k0 t) c2) \to ((getl (r -k0 n) c (CHead d1 (Bind b) v)) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))) (\lambda (b0: -B).(\lambda (H4: (wf3 g (CHead c (Bind b0) t) c2)).(\lambda (H5: (getl (r -(Bind b0) n) c (CHead d1 (Bind b) v))).(let H_x \def (wf3_gen_bind1 g c c2 t -b0 H4) in (let H6 \def H_x in (or_ind (ex3_2 C T (\lambda (c3: C).(\lambda -(_: T).(eq C c2 (CHead c3 (Bind b0) t)))) (\lambda (c3: C).(\lambda (_: -T).(wf3 g c c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g c t w0)))) (ex3 C -(\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: -C).(wf3 g c c3)) (\lambda (_: C).(\forall (w0: T).((ty3 g c t w0) \to -False)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind b) v))) -(\lambda (d2: C).(wf3 g d1 d2))) (\lambda (H7: (ex3_2 C T (\lambda (c3: -C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b0) t)))) (\lambda (c3: -C).(\lambda (_: T).(wf3 g c c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g c t -w0))))).(ex3_2_ind C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 -(Bind b0) t)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c c3))) (\lambda (_: -C).(\lambda (w0: T).(ty3 g c t w0))) (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H8: (eq C c2 (CHead x0 (Bind b0) t))).(\lambda -(H9: (wf3 g c x0)).(\lambda (_: (ty3 g c t x1)).(eq_ind_r C (CHead x0 (Bind -b0) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(getl (S n) c0 (CHead d2 -(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H c d1 v H5 g -x0 H9 w H3) in (let H11 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl n x0 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)) (ex2 C (\lambda (d2: -C).(getl (S n) (CHead x0 (Bind b0) t) (CHead d2 (Bind b) v))) (\lambda (d2: -C).(wf3 g d1 d2))) (\lambda (x: C).(\lambda (H12: (getl n x0 (CHead x (Bind -b) v))).(\lambda (H13: (wf3 g d1 x)).(ex_intro2 C (\lambda (d2: C).(getl (S -n) (CHead x0 (Bind b0) t) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 -d2)) x (getl_head (Bind b0) n x0 (CHead x (Bind b) v) H12 t) H13)))) H11))) -c2 H8)))))) H7)) (\lambda (H7: (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 -(Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c c3)) (\lambda (_: -C).(\forall (w0: T).((ty3 g c t w0) \to False))))).(ex3_ind C (\lambda (c3: -C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c c3)) -(\lambda (_: C).(\forall (w0: T).((ty3 g c t w0) \to False))) (ex2 C (\lambda -(d2: C).(getl (S n) c2 (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 -d2))) (\lambda (x0: C).(\lambda (H8: (eq C c2 (CHead x0 (Bind Void) (TSort -O)))).(\lambda (H9: (wf3 g c x0)).(\lambda (_: ((\forall (w0: T).((ty3 g c t -w0) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda (c0: -C).(ex2 C (\lambda (d2: C).(getl (S n) c0 (CHead d2 (Bind b) v))) (\lambda -(d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H c d1 v H5 g x0 H9 w H3) in (let -H11 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl n x0 (CHead d2 (Bind b) -v))) (\lambda (d2: C).(wf3 g d1 d2)) (ex2 C (\lambda (d2: C).(getl (S n) -(CHead x0 (Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: -C).(wf3 g d1 d2))) (\lambda (x: C).(\lambda (H12: (getl n x0 (CHead x (Bind -b) v))).(\lambda (H13: (wf3 g d1 x)).(ex_intro2 C (\lambda (d2: C).(getl (S -n) (CHead x0 (Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: -C).(wf3 g d1 d2)) x (getl_head (Bind Void) n x0 (CHead x (Bind b) v) H12 -(TSort O)) H13)))) H11))) c2 H8))))) H7)) H6)))))) (\lambda (f: F).(\lambda -(H4: (wf3 g (CHead c (Flat f) t) c2)).(\lambda (H5: (getl (r (Flat f) n) c -(CHead d1 (Bind b) v))).(let H_y \def (wf3_gen_flat1 g c c2 t f H4) in (H0 d1 -v H5 g c2 H_y w H3))))) k H2 (getl_gen_S k c (CHead d1 (Bind b) v) t n -H1)))))))))))))) c1)))) i)). - -theorem wf3_total: - \forall (g: G).(\forall (c1: C).(ex C (\lambda (c2: C).(wf3 g c1 c2)))) -\def - \lambda (g: G).(\lambda (c1: C).(C_ind (\lambda (c: C).(ex C (\lambda (c2: -C).(wf3 g c c2)))) (\lambda (n: nat).(ex_intro C (\lambda (c2: C).(wf3 g -(CSort n) c2)) (CSort n) (wf3_sort g n))) (\lambda (c: C).(\lambda (H: (ex C -(\lambda (c2: C).(wf3 g c c2)))).(\lambda (k: K).(\lambda (t: T).(let H0 \def -H in (ex_ind C (\lambda (c2: C).(wf3 g c c2)) (ex C (\lambda (c2: C).(wf3 g -(CHead c k t) c2))) (\lambda (x: C).(\lambda (H1: (wf3 g c x)).(K_ind -(\lambda (k0: K).(ex C (\lambda (c2: C).(wf3 g (CHead c k0 t) c2)))) (\lambda -(b: B).(let H_x \def (ty3_inference g c t) in (let H2 \def H_x in (or_ind (ex -T (\lambda (t2: T).(ty3 g c t t2))) (\forall (t2: T).((ty3 g c t t2) \to -False)) (ex C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2))) (\lambda -(H3: (ex T (\lambda (t2: T).(ty3 g c t t2)))).(ex_ind T (\lambda (t2: T).(ty3 -g c t t2)) (ex C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2))) (\lambda -(x0: T).(\lambda (H4: (ty3 g c t x0)).(ex_intro C (\lambda (c2: C).(wf3 g -(CHead c (Bind b) t) c2)) (CHead x (Bind b) t) (wf3_bind g c x H1 t x0 H4 -b)))) H3)) (\lambda (H3: ((\forall (t2: T).((ty3 g c t t2) \to -False)))).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) -(CHead x (Bind Void) (TSort O)) (wf3_void g c x H1 t H3 b))) H2)))) (\lambda -(f: F).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) x -(wf3_flat g c x H1 t f))) k))) H0)))))) c1)). - -theorem getl_wf3_trans: - \forall (i: nat).(\forall (c1: C).(\forall (d1: C).((getl i c1 d1) \to -(\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: -C).(wf3 g c1 c2)) (\lambda (c2: C).(getl i c2 d2))))))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: -C).((getl n c1 d1) \to (\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to -(ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl n c2 -d2)))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (H: (getl O c1 -d1)).(\lambda (g: G).(\lambda (d2: C).(\lambda (H0: (wf3 g d1 d2)).(let H_x -\def (clear_wf3_trans c1 d1 (getl_gen_O c1 d1 H) g d2 H0) in (let H1 \def H_x -in (ex2_ind C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(clear c2 d2)) -(ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl O c2 d2))) -(\lambda (x: C).(\lambda (H2: (wf3 g c1 x)).(\lambda (H3: (clear x -d2)).(ex_intro2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl O c2 -d2)) x H2 (getl_intro O x d2 x (drop_refl x) H3))))) H1))))))))) (\lambda (n: -nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).((getl n c1 d1) \to -(\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: -C).(wf3 g c1 c2)) (\lambda (c2: C).(getl n c2 d2))))))))))).(\lambda (c1: -C).(C_ind (\lambda (c: C).(\forall (d1: C).((getl (S n) c d1) \to (\forall -(g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: C).(wf3 g c -c2)) (\lambda (c2: C).(getl (S n) c2 d2))))))))) (\lambda (n0: nat).(\lambda -(d1: C).(\lambda (H0: (getl (S n) (CSort n0) d1)).(\lambda (g: G).(\lambda -(d2: C).(\lambda (_: (wf3 g d1 d2)).(getl_gen_sort n0 (S n) d1 H0 (ex2 C -(\lambda (c2: C).(wf3 g (CSort n0) c2)) (\lambda (c2: C).(getl (S n) c2 -d2)))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).((getl (S n) c -d1) \to (\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda -(c2: C).(wf3 g c c2)) (\lambda (c2: C).(getl (S n) c2 d2)))))))))).(\lambda -(k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (H1: (getl (S n) (CHead c k -t) d1)).(\lambda (g: G).(\lambda (d2: C).(\lambda (H2: (wf3 g d1 d2)).(K_ind -(\lambda (k0: K).((getl (r k0 n) c d1) \to (ex2 C (\lambda (c2: C).(wf3 g -(CHead c k0 t) c2)) (\lambda (c2: C).(getl (S n) c2 d2))))) (\lambda (b: -B).(\lambda (H3: (getl (r (Bind b) n) c d1)).(let H_x \def (H c d1 H3 g d2 -H2) in (let H4 \def H_x in (ex2_ind C (\lambda (c2: C).(wf3 g c c2)) (\lambda -(c2: C).(getl n c2 d2)) (ex2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) -c2)) (\lambda (c2: C).(getl (S n) c2 d2))) (\lambda (x: C).(\lambda (H5: (wf3 -g c x)).(\lambda (H6: (getl n x d2)).(let H_x0 \def (ty3_inference g c t) in -(let H7 \def H_x0 in (or_ind (ex T (\lambda (t2: T).(ty3 g c t t2))) (\forall -(t2: T).((ty3 g c t t2) \to False)) (ex2 C (\lambda (c2: C).(wf3 g (CHead c -(Bind b) t) c2)) (\lambda (c2: C).(getl (S n) c2 d2))) (\lambda (H8: (ex T -(\lambda (t2: T).(ty3 g c t t2)))).(ex_ind T (\lambda (t2: T).(ty3 g c t t2)) -(ex2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) (\lambda (c2: -C).(getl (S n) c2 d2))) (\lambda (x0: T).(\lambda (H9: (ty3 g c t -x0)).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) (\lambda -(c2: C).(getl (S n) c2 d2)) (CHead x (Bind b) t) (wf3_bind g c x H5 t x0 H9 -b) (getl_head (Bind b) n x d2 H6 t)))) H8)) (\lambda (H8: ((\forall (t2: -T).((ty3 g c t t2) \to False)))).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead -c (Bind b) t) c2)) (\lambda (c2: C).(getl (S n) c2 d2)) (CHead x (Bind Void) -(TSort O)) (wf3_void g c x H5 t H8 b) (getl_head (Bind Void) n x d2 H6 (TSort -O)))) H7)))))) H4))))) (\lambda (f: F).(\lambda (H3: (getl (r (Flat f) n) c -d1)).(let H_x \def (H0 d1 H3 g d2 H2) in (let H4 \def H_x in (ex2_ind C -(\lambda (c2: C).(wf3 g c c2)) (\lambda (c2: C).(getl (S n) c2 d2)) (ex2 C -(\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) (\lambda (c2: C).(getl (S -n) c2 d2))) (\lambda (x: C).(\lambda (H5: (wf3 g c x)).(\lambda (H6: (getl (S -n) x d2)).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) -(\lambda (c2: C).(getl (S n) c2 d2)) x (wf3_flat g c x H5 t f) H6)))) H4))))) -k (getl_gen_S k c d1 t n H1))))))))))) c1)))) i). - theorem ty3_shift1: \forall (g: G).(\forall (c: C).((wf3 g c c) \to (\forall (t1: T).(\forall (t2: T).((ty3 g c t1 t2) \to (ty3 g (CSort (cbk c)) (app1 c t1) (app1 c @@ -1390,139 +540,3 @@ K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])) I t1)) (app1 c1 (THead (Flat f) u t2))) H10)))) H8)))))))))))))))) y c H0))) H))). -theorem wf3_pr2_conf: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr2 c1 -t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t1 -u) \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).((wf3 g c c2) \to (\forall (u: T).((ty3 g c t u) \to (pr2 -c2 t t0)))))))) (\lambda (c: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda -(H0: (pr0 t3 t4)).(\lambda (c2: C).(\lambda (_: (wf3 g c c2)).(\lambda (u: -T).(\lambda (_: (ty3 g c t3 u)).(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: (wf3 g c c2)).(\lambda (u0: T).(\lambda (H4: (ty3 g c t3 -u0)).(let H_y \def (ty3_sred_pr0 t3 t4 H1 g c u0 H4) in (let H_x \def -(ty3_getl_subst0 g c t4 u0 H_y u t i H2 Abbr d u H0) in (let H5 \def H_x in -(ex_ind T (\lambda (w: T).(ty3 g d u w)) (pr2 c2 t3 t) (\lambda (x: -T).(\lambda (H6: (ty3 g d u x)).(let H_x0 \def (wf3_getl_conf Abbr i c d u H0 -g c2 H3 x H6) in (let H7 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(wf3 g d d2)) (pr2 c2 t3 t) -(\lambda (x0: C).(\lambda (H8: (getl i c2 (CHead x0 (Bind Abbr) u))).(\lambda -(_: (wf3 g d x0)).(pr2_delta c2 x0 u i H8 t3 t4 H1 t H2)))) H7))))) -H5)))))))))))))))))) c1 t1 t2 H))))). - -theorem wf3_pr3_conf: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr3 c1 -t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t1 -u) \to (pr3 c2 t1 t2))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (pr3 c1 t1 t2)).(pr3_ind c1 (\lambda (t: T).(\lambda (t0: T).(\forall -(c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t u) \to (pr3 c2 t -t0))))))) (\lambda (t: T).(\lambda (c2: C).(\lambda (_: (wf3 g c1 -c2)).(\lambda (u: T).(\lambda (_: (ty3 g c1 t u)).(pr3_refl c2 t)))))) -(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr2 c1 t4 t3)).(\lambda (t5: -T).(\lambda (_: (pr3 c1 t3 t5)).(\lambda (H2: ((\forall (c2: C).((wf3 g c1 -c2) \to (\forall (u: T).((ty3 g c1 t3 u) \to (pr3 c2 t3 t5))))))).(\lambda -(c2: C).(\lambda (H3: (wf3 g c1 c2)).(\lambda (u: T).(\lambda (H4: (ty3 g c1 -t4 u)).(pr3_sing c2 t3 t4 (wf3_pr2_conf g c1 t4 t3 H0 c2 H3 u H4) t5 (H2 c2 -H3 u (ty3_sred_pr2 c1 t4 t3 H0 g u H4))))))))))))) t1 t2 H))))). - -theorem wf3_pc3_conf: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pc3 c1 -t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u1: T).((ty3 g c1 t1 -u1) \to (\forall (u2: T).((ty3 g c1 t2 u2) \to (pc3 c2 t1 t2))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (pc3 c1 t1 t2)).(\lambda (c2: C).(\lambda (H0: (wf3 g c1 c2)).(\lambda -(u1: T).(\lambda (H1: (ty3 g c1 t1 u1)).(\lambda (u2: T).(\lambda (H2: (ty3 g -c1 t2 u2)).(let H3 \def H in (ex2_ind T (\lambda (t: T).(pr3 c1 t1 t)) -(\lambda (t: T).(pr3 c1 t2 t)) (pc3 c2 t1 t2) (\lambda (x: T).(\lambda (H4: -(pr3 c1 t1 x)).(\lambda (H5: (pr3 c1 t2 x)).(pc3_pr3_t c2 t1 x (wf3_pr3_conf -g c1 t1 x H4 c2 H0 u1 H1) t2 (wf3_pr3_conf g c1 t2 x H5 c2 H0 u2 H2))))) -H3)))))))))))). - -theorem wf3_ty3_conf: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1 -t1 t2) \to (\forall (c2: C).((wf3 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).((wf3 g c c2) \to (ty3 g c2 t t0)))))) (\lambda (c: -C).(\lambda (t3: T).(\lambda (t: T).(\lambda (H0: (ty3 g c t3 t)).(\lambda -(H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t3 t))))).(\lambda (u: -T).(\lambda (t4: T).(\lambda (H2: (ty3 g c u t4)).(\lambda (H3: ((\forall -(c2: C).((wf3 g c c2) \to (ty3 g c2 u t4))))).(\lambda (H4: (pc3 c t4 -t3)).(\lambda (c2: C).(\lambda (H5: (wf3 g c c2)).(ex_ind T (\lambda (t0: -T).(ty3 g c t4 t0)) (ty3 g c2 u t3) (\lambda (x: T).(\lambda (H6: (ty3 g c t4 -x)).(ty3_conv g c2 t3 t (H1 c2 H5) u t4 (H3 c2 H5) (wf3_pc3_conf g c t4 t3 H4 -c2 H5 x H6 t H0)))) (ty3_correct g c u t4 H2)))))))))))))) (\lambda (c: -C).(\lambda (m: nat).(\lambda (c2: C).(\lambda (_: (wf3 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 -(H1: (ty3 g d u t)).(\lambda (H2: ((\forall (c2: C).((wf3 g d c2) \to (ty3 g -c2 u t))))).(\lambda (c2: C).(\lambda (H3: (wf3 g c c2)).(let H_x \def -(wf3_getl_conf Abbr n c d u H0 g c2 H3 t H1) in (let H4 \def H_x in (ex2_ind -C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: -C).(wf3 g d d2)) (ty3 g c2 (TLRef n) (lift (S n) O t)) (\lambda (x: -C).(\lambda (H5: (getl n c2 (CHead x (Bind Abbr) u))).(\lambda (H6: (wf3 g d -x)).(ty3_abbr g n c2 x u H5 t (H2 x H6))))) 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 (H1: (ty3 g d u -t)).(\lambda (H2: ((\forall (c2: C).((wf3 g d c2) \to (ty3 g c2 u -t))))).(\lambda (c2: C).(\lambda (H3: (wf3 g c c2)).(let H_x \def -(wf3_getl_conf Abst n c d u H0 g c2 H3 t H1) in (let H4 \def H_x in (ex2_ind -C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(wf3 g d d2)) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda (x: -C).(\lambda (H5: (getl n c2 (CHead x (Bind Abst) u))).(\lambda (H6: (wf3 g d -x)).(ty3_abst g n c2 x u H5 t (H2 x H6))))) H4))))))))))))) (\lambda (c: -C).(\lambda (u: T).(\lambda (t: T).(\lambda (H0: (ty3 g c u t)).(\lambda (H1: -((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 u t))))).(\lambda (b: -B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) -t3 t4)).(\lambda (H3: ((\forall (c2: C).((wf3 g (CHead c (Bind b) u) c2) \to -(ty3 g c2 t3 t4))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c c2)).(ty3_bind g -c2 u t (H1 c2 H4) b t3 t4 (H3 (CHead c2 (Bind b) u) (wf3_bind g c c2 H4 u t -H0 b))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda -(_: (ty3 g c w u)).(\lambda (H1: ((\forall (c2: C).((wf3 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).((wf3 g c c2) \to (ty3 g -c2 v (THead (Bind Abst) u t)))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c -c2)).(ty3_appl g c2 w u (H1 c2 H4) v t (H3 c2 H4))))))))))))) (\lambda (c: -C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g c t3 t4)).(\lambda -(H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t3 t4))))).(\lambda (t0: -T).(\lambda (_: (ty3 g c t4 t0)).(\lambda (H3: ((\forall (c2: C).((wf3 g c -c2) \to (ty3 g c2 t4 t0))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c -c2)).(ty3_cast g c2 t3 t4 (H1 c2 H4) t0 (H3 c2 H4)))))))))))) c1 t1 t2 H))))). - -theorem wf3_idem: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (wf3 g -c2 c2)))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wf3 g c1 -c2)).(wf3_ind g (\lambda (_: C).(\lambda (c0: C).(wf3 g c0 c0))) (\lambda (m: -nat).(wf3_sort g m)) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wf3 g -c3 c4)).(\lambda (H1: (wf3 g c4 c4)).(\lambda (u: T).(\lambda (t: T).(\lambda -(H2: (ty3 g c3 u t)).(\lambda (b: B).(wf3_bind g c4 c4 H1 u t (wf3_ty3_conf g -c3 u t H2 c4 H0) b))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (_: -(wf3 g c3 c4)).(\lambda (H1: (wf3 g c4 c4)).(\lambda (u: T).(\lambda (_: -((\forall (t: T).((ty3 g c3 u t) \to False)))).(\lambda (_: B).(wf3_bind g c4 -c4 H1 (TSort O) (TSort (next g O)) (ty3_sort g c4 O) Void)))))))) (\lambda -(c3: C).(\lambda (c4: C).(\lambda (_: (wf3 g c3 c4)).(\lambda (H1: (wf3 g c4 -c4)).(\lambda (_: T).(\lambda (_: F).H1)))))) c1 c2 H)))). - -theorem wf3_ty3: - \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (u: T).((ty3 g c1 t -u) \to (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(ty3 g c2 t -u))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: -(ty3 g c1 t u)).(let H_x \def (wf3_total g c1) in (let H0 \def H_x in (ex_ind -C (\lambda (c2: C).(wf3 g c1 c2)) (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) -(\lambda (c2: C).(ty3 g c2 t u))) (\lambda (x: C).(\lambda (H1: (wf3 g c1 -x)).(ex_intro2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(ty3 g c2 t -u)) x H1 (wf3_ty3_conf g c1 t u H x H1)))) H0))))))). - diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/theory.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/theory.ma index 04950ea01..b996dc365 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/theory.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/theory.ma @@ -32,5 +32,5 @@ include "LambdaDelta-1/ty3/tau0.ma". include "LambdaDelta-1/ty3/nf2.ma". -include "LambdaDelta-1/ty3/dec.ma". +include "LambdaDelta-1/wf3/props.ma". diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/props.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/props.ma index 4ffc591ad..eeff4dc80 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/props.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/props.ma @@ -458,3 +458,215 @@ c v x)).(ex_intro T (\lambda (u: T).(ty3 g c (THead (Flat Cast) v t) u)) (THead (Flat Cast) x v) (ty3_cast g c t v H x H0)))) (ty3_correct g c t v H)))))). +theorem ty3_getl_subst0: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (u: T).((ty3 g c t +u) \to (\forall (v0: T).(\forall (t0: T).(\forall (i: nat).((subst0 i v0 t +t0) \to (\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c (CHead d +(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: +(ty3 g c t u)).(ty3_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: +T).(\forall (v0: T).(\forall (t2: T).(\forall (i: nat).((subst0 i v0 t0 t2) +\to (\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d +(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v w)))))))))))))) (\lambda +(c0: C).(\lambda (t2: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 +t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: +nat).((subst0 i v0 t2 t1) \to (\forall (b: B).(\forall (d: C).(\forall (v: +T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v +w))))))))))))).(\lambda (u0: T).(\lambda (t1: T).(\lambda (_: (ty3 g c0 u0 +t1)).(\lambda (H3: ((\forall (v0: T).(\forall (t3: T).(\forall (i: +nat).((subst0 i v0 u0 t3) \to (\forall (b: B).(\forall (d: C).(\forall (v: +T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v +w))))))))))))).(\lambda (_: (pc3 c0 t1 t2)).(\lambda (v0: T).(\lambda (t3: +T).(\lambda (i: nat).(\lambda (H5: (subst0 i v0 u0 t3)).(\lambda (b: +B).(\lambda (d: C).(\lambda (v: T).(\lambda (H6: (getl i c0 (CHead d (Bind b) +v))).(H3 v0 t3 i H5 b d v H6))))))))))))))))))) (\lambda (c0: C).(\lambda (m: +nat).(\lambda (v0: T).(\lambda (t0: T).(\lambda (i: nat).(\lambda (H0: +(subst0 i v0 (TSort m) t0)).(\lambda (b: B).(\lambda (d: C).(\lambda (v: +T).(\lambda (_: (getl i c0 (CHead d (Bind b) v))).(subst0_gen_sort v0 t0 i m +H0 (ex T (\lambda (w: T).(ty3 g d v w)))))))))))))) (\lambda (n: +nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n +c0 (CHead d (Bind Abbr) u0))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u0 +t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: +nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall (d0: C).(\forall (v: +T).((getl i d (CHead d0 (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d0 v +w))))))))))))).(\lambda (v0: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda +(H3: (subst0 i v0 (TLRef n) t1)).(\lambda (b: B).(\lambda (d0: C).(\lambda +(v: T).(\lambda (H4: (getl i c0 (CHead d0 (Bind b) v))).(and_ind (eq nat n i) +(eq T t1 (lift (S n) O v0)) (ex T (\lambda (w: T).(ty3 g d0 v w))) (\lambda +(H5: (eq nat n i)).(\lambda (_: (eq T t1 (lift (S n) O v0))).(let H7 \def +(eq_ind_r nat i (\lambda (n0: nat).(getl n0 c0 (CHead d0 (Bind b) v))) H4 n +H5) in (let H8 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c1: C).(getl +n c0 c1)) H0 (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n +H0 (CHead d0 (Bind b) v) H7)) in (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) u0) (CHead d0 (Bind b) +v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind b) v) 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) u0) (CHead d0 (Bind b) v) +(getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in +((let H11 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: +C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t2) \Rightarrow t2])) +(CHead d (Bind Abbr) u0) (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind +Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in (\lambda (H12: (eq B Abbr +b)).(\lambda (H13: (eq C d d0)).(let H14 \def (eq_ind_r T v (\lambda (t2: +T).(getl n c0 (CHead d0 (Bind b) t2))) H8 u0 H11) in (eq_ind T u0 (\lambda +(t2: T).(ex T (\lambda (w: T).(ty3 g d0 t2 w)))) (let H15 \def (eq_ind_r C d0 +(\lambda (c1: C).(getl n c0 (CHead c1 (Bind b) u0))) H14 d H13) in (eq_ind C +d (\lambda (c1: C).(ex T (\lambda (w: T).(ty3 g c1 u0 w)))) (let H16 \def +(eq_ind_r B b (\lambda (b0: B).(getl n c0 (CHead d (Bind b0) u0))) H15 Abbr +H12) in (ex_intro T (\lambda (w: T).(ty3 g d u0 w)) t0 H1)) d0 H13)) v +H11))))) H10)) H9)))))) (subst0_gen_lref v0 t1 i n H3)))))))))))))))))) +(\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda +(H0: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t0: T).(\lambda (H1: +(ty3 g d u0 t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: +nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall (d0: C).(\forall (v: +T).((getl i d (CHead d0 (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d0 v +w))))))))))))).(\lambda (v0: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda +(H3: (subst0 i v0 (TLRef n) t1)).(\lambda (b: B).(\lambda (d0: C).(\lambda +(v: T).(\lambda (H4: (getl i c0 (CHead d0 (Bind b) v))).(and_ind (eq nat n i) +(eq T t1 (lift (S n) O v0)) (ex T (\lambda (w: T).(ty3 g d0 v w))) (\lambda +(H5: (eq nat n i)).(\lambda (_: (eq T t1 (lift (S n) O v0))).(let H7 \def +(eq_ind_r nat i (\lambda (n0: nat).(getl n0 c0 (CHead d0 (Bind b) v))) H4 n +H5) in (let H8 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c1: C).(getl +n c0 c1)) H0 (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abst) u0) n +H0 (CHead d0 (Bind b) v) H7)) in (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 Abst) u0) (CHead d0 (Bind b) +v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in +((let H10 \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 b0) \Rightarrow b0 | (Flat _) +\Rightarrow Abst])])) (CHead d (Bind Abst) u0) (CHead d0 (Bind b) v) +(getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in +((let H11 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: +C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t2) \Rightarrow t2])) +(CHead d (Bind Abst) u0) (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind +Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in (\lambda (H12: (eq B Abst +b)).(\lambda (H13: (eq C d d0)).(let H14 \def (eq_ind_r T v (\lambda (t2: +T).(getl n c0 (CHead d0 (Bind b) t2))) H8 u0 H11) in (eq_ind T u0 (\lambda +(t2: T).(ex T (\lambda (w: T).(ty3 g d0 t2 w)))) (let H15 \def (eq_ind_r C d0 +(\lambda (c1: C).(getl n c0 (CHead c1 (Bind b) u0))) H14 d H13) in (eq_ind C +d (\lambda (c1: C).(ex T (\lambda (w: T).(ty3 g c1 u0 w)))) (let H16 \def +(eq_ind_r B b (\lambda (b0: B).(getl n c0 (CHead d (Bind b0) u0))) H15 Abst +H12) in (ex_intro T (\lambda (w: T).(ty3 g d u0 w)) t0 H1)) d0 H13)) v +H11))))) H10)) H9)))))) (subst0_gen_lref v0 t1 i n H3)))))))))))))))))) +(\lambda (c0: C).(\lambda (u0: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 u0 +t0)).(\lambda (H1: ((\forall (v0: T).(\forall (t1: T).(\forall (i: +nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall (d: C).(\forall (v: +T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v +w))))))))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: +(ty3 g (CHead c0 (Bind b) u0) t1 t2)).(\lambda (H3: ((\forall (v0: +T).(\forall (t3: T).(\forall (i: nat).((subst0 i v0 t1 t3) \to (\forall (b0: +B).(\forall (d: C).(\forall (v: T).((getl i (CHead c0 (Bind b) u0) (CHead d +(Bind b0) v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))).(\lambda +(v0: T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead +(Bind b) u0 t1) t3)).(\lambda (b0: B).(\lambda (d: C).(\lambda (v: +T).(\lambda (H5: (getl i c0 (CHead d (Bind b0) v))).(or3_ind (ex2 T (\lambda +(u2: T).(eq T t3 (THead (Bind b) u2 t1))) (\lambda (u2: T).(subst0 i v0 u0 +u2))) (ex2 T (\lambda (t4: T).(eq T t3 (THead (Bind b) u0 t4))) (\lambda (t4: +T).(subst0 (s (Bind b) i) v0 t1 t4))) (ex3_2 T T (\lambda (u2: T).(\lambda +(t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i v0 u0 u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Bind b) +i) v0 t1 t4)))) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (H6: (ex2 T +(\lambda (u2: T).(eq T t3 (THead (Bind b) u2 t1))) (\lambda (u2: T).(subst0 i +v0 u0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Bind b) u2 t1))) +(\lambda (u2: T).(subst0 i v0 u0 u2)) (ex T (\lambda (w: T).(ty3 g d v w))) +(\lambda (x: T).(\lambda (_: (eq T t3 (THead (Bind b) x t1))).(\lambda (H8: +(subst0 i v0 u0 x)).(H1 v0 x i H8 b0 d v H5)))) H6)) (\lambda (H6: (ex2 T +(\lambda (t4: T).(eq T t3 (THead (Bind b) u0 t4))) (\lambda (t4: T).(subst0 +(s (Bind b) i) v0 t1 t4)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead (Bind +b) u0 t4))) (\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 t4)) (ex T (\lambda +(w: T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: (eq T t3 (THead (Bind b) +u0 x))).(\lambda (H8: (subst0 (s (Bind b) i) v0 t1 x)).(H3 v0 x (S i) H8 b0 d +v (getl_head (Bind b) i c0 (CHead d (Bind b0) v) H5 u0))))) H6)) (\lambda +(H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2 +t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 u0 u2))) (\lambda (_: +T).(\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 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).(subst0 i v0 u0 u2))) (\lambda (_: T).(\lambda (t4: +T).(subst0 (s (Bind b) i) v0 t1 t4))) (ex T (\lambda (w: T).(ty3 g d v w))) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T t3 (THead (Bind b) x0 +x1))).(\lambda (H8: (subst0 i v0 u0 x0)).(\lambda (_: (subst0 (s (Bind b) i) +v0 t1 x1)).(H1 v0 x0 i H8 b0 d v H5)))))) H6)) (subst0_gen_head (Bind b) v0 +u0 t1 t3 i H4)))))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda +(u0: T).(\lambda (_: (ty3 g c0 w u0)).(\lambda (H1: ((\forall (v0: +T).(\forall (t0: T).(\forall (i: nat).((subst0 i v0 w t0) \to (\forall (b: +B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d (Bind b) v)) \to (ex +T (\lambda (w0: T).(ty3 g d v w0))))))))))))).(\lambda (v: T).(\lambda (t0: +T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u0 t0))).(\lambda (H3: +((\forall (v0: T).(\forall (t1: T).(\forall (i: nat).((subst0 i v0 v t1) \to +(\forall (b: B).(\forall (d: C).(\forall (v1: T).((getl i c0 (CHead d (Bind +b) v1)) \to (ex T (\lambda (w0: T).(ty3 g d v1 w0))))))))))))).(\lambda (v0: +T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead (Flat +Appl) w v) t1)).(\lambda (b: B).(\lambda (d: C).(\lambda (v1: T).(\lambda +(H5: (getl i c0 (CHead d (Bind b) v1))).(or3_ind (ex2 T (\lambda (u2: T).(eq +T t1 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i v0 w u2))) (ex2 T +(\lambda (t2: T).(eq T t1 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 +(s (Flat Appl) i) v0 v t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq +T t1 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i +v0 w u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v +t2)))) (ex T (\lambda (w0: T).(ty3 g d v1 w0))) (\lambda (H6: (ex2 T (\lambda +(u2: T).(eq T t1 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i v0 w +u2)))).(ex2_ind T (\lambda (u2: T).(eq T t1 (THead (Flat Appl) u2 v))) +(\lambda (u2: T).(subst0 i v0 w u2)) (ex T (\lambda (w0: T).(ty3 g d v1 w0))) +(\lambda (x: T).(\lambda (_: (eq T t1 (THead (Flat Appl) x v))).(\lambda (H8: +(subst0 i v0 w x)).(H1 v0 x i H8 b d v1 H5)))) H6)) (\lambda (H6: (ex2 T +(\lambda (t2: T).(eq T t1 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 +(s (Flat Appl) i) v0 v t2)))).(ex2_ind T (\lambda (t2: T).(eq T t1 (THead +(Flat Appl) w t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2)) (ex +T (\lambda (w0: T).(ty3 g d v1 w0))) (\lambda (x: T).(\lambda (_: (eq T t1 +(THead (Flat Appl) w x))).(\lambda (H8: (subst0 (s (Flat Appl) i) v0 v +x)).(H3 v0 x (s (Flat Appl) i) H8 b d v1 H5)))) H6)) (\lambda (H6: (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T t1 (THead (Flat Appl) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w u2))) (\lambda (_: +T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t2: T).(eq T t1 (THead (Flat Appl) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w u2))) (\lambda (_: +T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2))) (ex T (\lambda (w0: +T).(ty3 g d v1 w0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T t1 +(THead (Flat Appl) x0 x1))).(\lambda (_: (subst0 i v0 w x0)).(\lambda (H9: +(subst0 (s (Flat Appl) i) v0 v x1)).(H3 v0 x1 (s (Flat Appl) i) H9 b d v1 +H5)))))) H6)) (subst0_gen_head (Flat Appl) v0 w v t1 i H4))))))))))))))))))) +(\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 +t2)).(\lambda (H1: ((\forall (v0: T).(\forall (t0: T).(\forall (i: +nat).((subst0 i v0 t1 t0) \to (\forall (b: B).(\forall (d: C).(\forall (v: +T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v +w))))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (H3: +((\forall (v0: T).(\forall (t3: T).(\forall (i: nat).((subst0 i v0 t2 t3) \to +(\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d (Bind b) +v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))).(\lambda (v0: +T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead (Flat +Cast) t2 t1) t3)).(\lambda (b: B).(\lambda (d: C).(\lambda (v: T).(\lambda +(H5: (getl i c0 (CHead d (Bind b) v))).(or3_ind (ex2 T (\lambda (u2: T).(eq T +t3 (THead (Flat Cast) u2 t1))) (\lambda (u2: T).(subst0 i v0 t2 u2))) (ex2 T +(\lambda (t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) (\lambda (t4: +T).(subst0 (s (Flat Cast) i) v0 t1 t4))) (ex3_2 T T (\lambda (u2: T).(\lambda +(t4: T).(eq T t3 (THead (Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i v0 t2 u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat +Cast) i) v0 t1 t4)))) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (H6: +(ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Cast) u2 t1))) (\lambda (u2: +T).(subst0 i v0 t2 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat +Cast) u2 t1))) (\lambda (u2: T).(subst0 i v0 t2 u2)) (ex T (\lambda (w: +T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: (eq T t3 (THead (Flat Cast) x +t1))).(\lambda (H8: (subst0 i v0 t2 x)).(H3 v0 x i H8 b d v H5)))) H6)) +(\lambda (H6: (ex2 T (\lambda (t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) +(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 t4)))).(ex2_ind T (\lambda +(t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) (\lambda (t4: T).(subst0 (s +(Flat Cast) i) v0 t1 t4)) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (x: +T).(\lambda (_: (eq T t3 (THead (Flat Cast) t2 x))).(\lambda (H8: (subst0 (s +(Flat Cast) i) v0 t1 x)).(H1 v0 x (s (Flat Cast) i) H8 b d v H5)))) H6)) +(\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 t2 u2))) +(\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 +t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 t2 u2))) +(\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 t4))) (ex T +(\lambda (w: T).(ty3 g d v w))) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(_: (eq T t3 (THead (Flat Cast) x0 x1))).(\lambda (H8: (subst0 i v0 t2 +x0)).(\lambda (_: (subst0 (s (Flat Cast) i) v0 t1 x1)).(H3 v0 x0 i H8 b d v +H5)))))) H6)) (subst0_gen_head (Flat Cast) v0 t2 t1 t3 i H4)))))))))))))))))) +c t u H))))). + diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/clear.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/clear.ma new file mode 100644 index 000000000..ead56e7a7 --- /dev/null +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/clear.ma @@ -0,0 +1,85 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +include "LambdaDelta-1/wf3/fwd.ma". + +theorem wf3_clear_conf: + \forall (c1: C).(\forall (c: C).((clear c1 c) \to (\forall (g: G).(\forall +(c2: C).((wf3 g c1 c2) \to (wf3 g c c2)))))) +\def + \lambda (c1: C).(\lambda (c: C).(\lambda (H: (clear c1 c)).(clear_ind +(\lambda (c0: C).(\lambda (c2: C).(\forall (g: G).(\forall (c3: C).((wf3 g c0 +c3) \to (wf3 g c2 c3)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: +T).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (wf3 g (CHead e (Bind b) u) +c2)).H0)))))) (\lambda (e: C).(\lambda (c0: C).(\lambda (_: (clear e +c0)).(\lambda (H1: ((\forall (g: G).(\forall (c2: C).((wf3 g e c2) \to (wf3 g +c0 c2)))))).(\lambda (f: F).(\lambda (u: T).(\lambda (g: G).(\lambda (c2: +C).(\lambda (H2: (wf3 g (CHead e (Flat f) u) c2)).(let H_y \def +(wf3_gen_flat1 g e c2 u f H2) in (H1 g c2 H_y))))))))))) c1 c H))). + +theorem clear_wf3_trans: + \forall (c1: C).(\forall (d1: C).((clear c1 d1) \to (\forall (g: G).(\forall +(d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda +(c2: C).(clear c2 d2)))))))) +\def + \lambda (c1: C).(\lambda (d1: C).(\lambda (H: (clear c1 d1)).(clear_ind +(\lambda (c: C).(\lambda (c0: C).(\forall (g: G).(\forall (d2: C).((wf3 g c0 +d2) \to (ex2 C (\lambda (c2: C).(wf3 g c c2)) (\lambda (c2: C).(clear c2 +d2)))))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(\lambda (g: +G).(\lambda (d2: C).(\lambda (H0: (wf3 g (CHead e (Bind b) u) d2)).(let H_x +\def (wf3_gen_bind1 g e d2 u b H0) in (let H1 \def H_x in (or_ind (ex3_2 C T +(\lambda (c2: C).(\lambda (_: T).(eq C d2 (CHead c2 (Bind b) u)))) (\lambda +(c2: C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g +e u w)))) (ex3 C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) (TSort O)))) +(\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: T).((ty3 g e u w) +\to False)))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) +(\lambda (c2: C).(clear c2 d2))) (\lambda (H2: (ex3_2 C T (\lambda (c2: +C).(\lambda (_: T).(eq C d2 (CHead c2 (Bind b) u)))) (\lambda (c2: +C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g e u +w))))).(ex3_2_ind C T (\lambda (c2: C).(\lambda (_: T).(eq C d2 (CHead c2 +(Bind b) u)))) (\lambda (c2: C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: +C).(\lambda (w: T).(ty3 g e u w))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e +(Bind b) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda (x0: C).(\lambda +(x1: T).(\lambda (H3: (eq C d2 (CHead x0 (Bind b) u))).(\lambda (H4: (wf3 g e +x0)).(\lambda (H5: (ty3 g e u x1)).(eq_ind_r C (CHead x0 (Bind b) u) (\lambda +(c: C).(ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) (\lambda (c2: +C).(clear c2 c)))) (ex_intro2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) +c2)) (\lambda (c2: C).(clear c2 (CHead x0 (Bind b) u))) (CHead x0 (Bind b) u) +(wf3_bind g e x0 H4 u x1 H5 b) (clear_bind b x0 u)) d2 H3)))))) H2)) (\lambda +(H2: (ex3 C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) (TSort O)))) +(\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: T).((ty3 g e u w) +\to False))))).(ex3_ind C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) +(TSort O)))) (\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: +T).((ty3 g e u w) \to False))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind +b) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda (x0: C).(\lambda (H3: +(eq C d2 (CHead x0 (Bind Void) (TSort O)))).(\lambda (H4: (wf3 g e +x0)).(\lambda (H5: ((\forall (w: T).((ty3 g e u w) \to False)))).(eq_ind_r C +(CHead x0 (Bind Void) (TSort O)) (\lambda (c: C).(ex2 C (\lambda (c2: C).(wf3 +g (CHead e (Bind b) u) c2)) (\lambda (c2: C).(clear c2 c)))) (ex_intro2 C +(\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) (\lambda (c2: C).(clear c2 +(CHead x0 (Bind Void) (TSort O)))) (CHead x0 (Bind Void) (TSort O)) (wf3_void +g e x0 H4 u H5 b) (clear_bind Void x0 (TSort O))) d2 H3))))) H2)) H1))))))))) +(\lambda (e: C).(\lambda (c: C).(\lambda (_: (clear e c)).(\lambda (H1: +((\forall (g: G).(\forall (d2: C).((wf3 g c d2) \to (ex2 C (\lambda (c2: +C).(wf3 g e c2)) (\lambda (c2: C).(clear c2 d2)))))))).(\lambda (f: +F).(\lambda (u: T).(\lambda (g: G).(\lambda (d2: C).(\lambda (H2: (wf3 g c +d2)).(let H_x \def (H1 g d2 H2) in (let H3 \def H_x in (ex2_ind C (\lambda +(c2: C).(wf3 g e c2)) (\lambda (c2: C).(clear c2 d2)) (ex2 C (\lambda (c2: +C).(wf3 g (CHead e (Flat f) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda +(x: C).(\lambda (H4: (wf3 g e x)).(\lambda (H5: (clear x d2)).(ex_intro2 C +(\lambda (c2: C).(wf3 g (CHead e (Flat f) u) c2)) (\lambda (c2: C).(clear c2 +d2)) x (wf3_flat g e x H4 u f) H5)))) H3)))))))))))) c1 d1 H))). + diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/preamble.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/defs.ma similarity index 57% rename from helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/preamble.ma rename to helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/defs.ma index f31ea2903..575cc6aef 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/preamble.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/defs.ma @@ -12,21 +12,18 @@ (* *) (**************************************************************************) -(* Project started Tue Aug 22, 2006 ***************************************) +(* This file was automatically generated: do not edit *********************) -(* PREAMBLE -*) +include "LambdaDelta-1/ty3/defs.ma". -include "logic/equality.ma". -include "datatypes/Bool.ma". -include "NPlus/monoid.ma". -include "NLE/props.ma". -include "NLE/nplus.ma". +inductive wf3 (g: G): C \to (C \to Prop) \def +| wf3_sort: \forall (m: nat).(wf3 g (CSort m) (CSort m)) +| wf3_bind: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: +T).(\forall (t: T).((ty3 g c1 u t) \to (\forall (b: B).(wf3 g (CHead c1 (Bind +b) u) (CHead c2 (Bind b) u)))))))) +| wf3_void: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: +T).(((\forall (t: T).((ty3 g c1 u t) \to False))) \to (\forall (b: B).(wf3 g +(CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)))))))) +| wf3_flat: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: +T).(\forall (f: F).(wf3 g (CHead c1 (Flat f) u) c2))))). -axiom f_equal_3: \forall (A,B,C,D:Set). - \forall (f:A \to B \to C \to D). - \forall (x1,x2:A). - \forall (y1,y2:B). - \forall (z1,z2:C). - x1 = x2 \to y1 = y2 \to z1 = z2 \to - f x1 y1 z1 = f x2 y2 z2. diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/fwd.ma new file mode 100644 index 000000000..aa63ef78a --- /dev/null +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/fwd.ma @@ -0,0 +1,299 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +include "LambdaDelta-1/wf3/defs.ma". + +theorem wf3_gen_sort1: + \forall (g: G).(\forall (x: C).(\forall (m: nat).((wf3 g (CSort m) x) \to +(eq C x (CSort m))))) +\def + \lambda (g: G).(\lambda (x: C).(\lambda (m: nat).(\lambda (H: (wf3 g (CSort +m) x)).(insert_eq C (CSort m) (\lambda (c: C).(wf3 g c x)) (\lambda (c: +C).(eq C x c)) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda +(c: C).(\lambda (c0: C).((eq C c (CSort m)) \to (eq C c0 c)))) (\lambda (m0: +nat).(\lambda (H1: (eq C (CSort m0) (CSort m))).(let H2 \def (f_equal C nat +(\lambda (e: C).(match e in C return (\lambda (_: C).nat) with [(CSort n) +\Rightarrow n | (CHead _ _ _) \Rightarrow m0])) (CSort m0) (CSort m) H1) in +(eq_ind_r nat m (\lambda (n: nat).(eq C (CSort n) (CSort n))) (refl_equal C +(CSort m)) m0 H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (wf3 g c1 +c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2 c1)))).(\lambda (u: +T).(\lambda (t: T).(\lambda (_: (ty3 g c1 u t)).(\lambda (b: B).(\lambda (H4: +(eq C (CHead c1 (Bind b) u) (CSort m))).(let H5 \def (eq_ind C (CHead c1 +(Bind b) u) (\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop) with +[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort m) +H4) in (False_ind (eq C (CHead c2 (Bind b) u) (CHead c1 (Bind b) u)) +H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (wf3 g c1 +c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2 c1)))).(\lambda (u: +T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u t) \to False)))).(\lambda (b: +B).(\lambda (H4: (eq C (CHead c1 (Bind b) u) (CSort m))).(let H5 \def (eq_ind +C (CHead c1 (Bind b) u) (\lambda (ee: C).(match ee in C return (\lambda (_: +C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow +True])) I (CSort m) H4) in (False_ind (eq C (CHead c2 (Bind Void) (TSort O)) +(CHead c1 (Bind b) u)) H5)))))))))) (\lambda (c1: C).(\lambda (c2: +C).(\lambda (_: (wf3 g c1 c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C +c2 c1)))).(\lambda (u: T).(\lambda (f: F).(\lambda (H3: (eq C (CHead c1 (Flat +f) u) (CSort m))).(let H4 \def (eq_ind C (CHead c1 (Flat f) u) (\lambda (ee: +C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow +False | (CHead _ _ _) \Rightarrow True])) I (CSort m) H3) in (False_ind (eq C +c2 (CHead c1 (Flat f) u)) H4))))))))) y x H0))) H)))). + +theorem wf3_gen_bind1: + \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (b: +B).((wf3 g (CHead c1 (Bind b) v) x) \to (or (ex3_2 C T (\lambda (c2: +C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2: C).(\lambda +(_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 +C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O)))) (\lambda (c2: +C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to +False)))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (b: +B).(\lambda (H: (wf3 g (CHead c1 (Bind b) v) x)).(insert_eq C (CHead c1 (Bind +b) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(or (ex3_2 C T (\lambda +(c2: C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2: +C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 +v w)))) (ex3 C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O)))) +(\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v +w) \to False)))))) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g +(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead c1 (Bind b) v)) \to (or +(ex3_2 C T (\lambda (c2: C).(\lambda (_: T).(eq C c0 (CHead c2 (Bind b) v)))) +(\lambda (c2: C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: +T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2: C).(eq C c0 (CHead c2 (Bind Void) +(TSort O)))) (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: +T).((ty3 g c1 v w) \to False)))))))) (\lambda (m: nat).(\lambda (H1: (eq C +(CSort m) (CHead c1 (Bind b) v))).(let H2 \def (eq_ind C (CSort m) (\lambda +(ee: C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _) +\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead c1 (Bind b) v) +H1) in (False_ind (or (ex3_2 C T (\lambda (c2: C).(\lambda (_: T).(eq C +(CSort m) (CHead c2 (Bind b) v)))) (\lambda (c2: C).(\lambda (_: T).(wf3 g c1 +c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2: +C).(eq C (CSort m) (CHead c2 (Bind Void) (TSort O)))) (\lambda (c2: C).(wf3 g +c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False))))) H2)))) +(\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: +(((eq C c0 (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda (c3: +C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: +C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 +v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) +(\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v +w) \to False)))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H3: (ty3 g c0 +u t)).(\lambda (b0: B).(\lambda (H4: (eq C (CHead c0 (Bind b0) u) (CHead c1 +(Bind b) v))).(let H5 \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 b0) u) (CHead c1 (Bind b) v) H4) in ((let H6 \def +(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with +[(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow (match k in K return +(\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow +b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let H7 \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 +b0) u) (CHead c1 (Bind b) v) H4) in (\lambda (H8: (eq B b0 b)).(\lambda (H9: +(eq C c0 c1)).(eq_ind_r B b (\lambda (b1: B).(or (ex3_2 C T (\lambda (c3: +C).(\lambda (_: T).(eq C (CHead c2 (Bind b1) u) (CHead c3 (Bind b) v)))) +(\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: +T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind b1) u) +(CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda +(_: C).(\forall (w: T).((ty3 g c1 v w) \to False)))))) (let H10 \def (eq_ind +T u (\lambda (t0: T).(ty3 g c0 t0 t)) H3 v H7) in (eq_ind_r T v (\lambda (t0: +T).(or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind b) +t0) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) +(\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq +C (CHead c2 (Bind b) t0) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: +C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to +False)))))) (let H11 \def (eq_ind C c0 (\lambda (c: C).(ty3 g c v t)) H10 c1 +H9) in (let H12 \def (eq_ind C c0 (\lambda (c: C).((eq C c (CHead c1 (Bind b) +v)) \to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 +(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: +C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead +c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: +C).(\forall (w: T).((ty3 g c1 v w) \to False))))))) H2 c1 H9) in (let H13 +\def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H9) in (or_introl +(ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind b) v) +(CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) +(\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq +C (CHead c2 (Bind b) v) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: +C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to +False)))) (ex3_2_intro C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2 +(Bind b) v) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g +c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w))) c2 t (refl_equal C +(CHead c2 (Bind b) v)) H13 H11))))) u H7)) b0 H8)))) H6)) H5))))))))))) +(\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: +(((eq C c0 (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda (c3: +C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: +C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 +v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) +(\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v +w) \to False)))))))).(\lambda (u: T).(\lambda (H3: ((\forall (t: T).((ty3 g +c0 u t) \to False)))).(\lambda (b0: B).(\lambda (H4: (eq C (CHead c0 (Bind +b0) u) (CHead c1 (Bind b) v))).(let H5 \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 b0) u) (CHead c1 (Bind b) v) +H4) in ((let H6 \def (f_equal C B (\lambda (e: C).(match e in C return +(\lambda (_: C).B) with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow +(match k in K return (\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | +(Flat _) \Rightarrow b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) +in ((let H7 \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 (Bind b0) u) (CHead c1 (Bind b) v) H4) in (\lambda (_: (eq B b0 +b)).(\lambda (H9: (eq C c0 c1)).(let H10 \def (eq_ind T u (\lambda (t: +T).(\forall (t0: T).((ty3 g c0 t t0) \to False))) H3 v H7) in (let H11 \def +(eq_ind C c0 (\lambda (c: C).(\forall (t: T).((ty3 g c v t) \to False))) H10 +c1 H9) in (let H12 \def (eq_ind C c0 (\lambda (c: C).((eq C c (CHead c1 (Bind +b) v)) \to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 +(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: +C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead +c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: +C).(\forall (w: T).((ty3 g c1 v w) \to False))))))) H2 c1 H9) in (let H13 +\def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H9) in (or_intror +(ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind Void) +(TSort O)) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g +c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda +(c3: C).(eq C (CHead c2 (Bind Void) (TSort O)) (CHead c3 (Bind Void) (TSort +O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g +c1 v w) \to False)))) (ex3_intro C (\lambda (c3: C).(eq C (CHead c2 (Bind +Void) (TSort O)) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g +c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False))) c2 +(refl_equal C (CHead c2 (Bind Void) (TSort O))) H13 H11))))))))) H6)) +H5)))))))))) (\lambda (c0: C).(\lambda (c2: C).(\lambda (_: (wf3 g c0 +c2)).(\lambda (_: (((eq C c0 (CHead c1 (Bind b) v)) \to (or (ex3_2 C T +(\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda +(c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 +g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort +O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g +c1 v w) \to False)))))))).(\lambda (u: T).(\lambda (f: F).(\lambda (H3: (eq C +(CHead c0 (Flat f) u) (CHead c1 (Bind b) v))).(let H4 \def (eq_ind C (CHead +c0 (Flat f) u) (\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop) +with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k in K +return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) +\Rightarrow True])])) I (CHead c1 (Bind b) v) H3) in (False_ind (or (ex3_2 C +T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda +(c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 +g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort +O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g +c1 v w) \to False))))) H4))))))))) y x H0))) H)))))). + +theorem wf3_gen_flat1: + \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (f: +F).((wf3 g (CHead c1 (Flat f) v) x) \to (wf3 g c1 x)))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (f: +F).(\lambda (H: (wf3 g (CHead c1 (Flat f) v) x)).(insert_eq C (CHead c1 (Flat +f) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(wf3 g c1 x)) (\lambda (y: +C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda (c: C).(\lambda (c0: +C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c0)))) (\lambda (m: +nat).(\lambda (H1: (eq C (CSort m) (CHead c1 (Flat f) v))).(let H2 \def +(eq_ind C (CSort m) (\lambda (ee: C).(match ee in C return (\lambda (_: +C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow +False])) I (CHead c1 (Flat f) v) H1) in (False_ind (wf3 g c1 (CSort m)) +H2)))) (\lambda (c0: C).(\lambda (c2: C).(\lambda (_: (wf3 g c0 c2)).(\lambda +(_: (((eq C c0 (CHead c1 (Flat f) v)) \to (wf3 g c1 c2)))).(\lambda (u: +T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (b: B).(\lambda (H4: +(eq C (CHead c0 (Bind b) u) (CHead c1 (Flat f) v))).(let H5 \def (eq_ind C +(CHead c0 (Bind b) u) (\lambda (ee: C).(match ee 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 c1 (Flat f) v) H4) in (False_ind (wf3 g c1 +(CHead c2 (Bind b) u)) H5))))))))))) (\lambda (c0: C).(\lambda (c2: +C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_: (((eq C c0 (CHead c1 (Flat f) v)) +\to (wf3 g c1 c2)))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c0 +u t) \to False)))).(\lambda (b: B).(\lambda (H4: (eq C (CHead c0 (Bind b) u) +(CHead c1 (Flat f) v))).(let H5 \def (eq_ind C (CHead c0 (Bind b) u) (\lambda +(ee: C).(match ee 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 c1 (Flat f) v) H4) in (False_ind (wf3 g c1 (CHead c2 +(Bind Void) (TSort O))) H5)))))))))) (\lambda (c0: C).(\lambda (c2: +C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 (Flat f) +v)) \to (wf3 g c1 c2)))).(\lambda (u: T).(\lambda (f0: F).(\lambda (H3: (eq C +(CHead c0 (Flat f0) u) (CHead c1 (Flat f) v))).(let H4 \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 (Flat f0) u) (CHead +c1 (Flat f) v) H3) in ((let H5 \def (f_equal C F (\lambda (e: C).(match e in +C return (\lambda (_: C).F) with [(CSort _) \Rightarrow f0 | (CHead _ k _) +\Rightarrow (match k in K return (\lambda (_: K).F) with [(Bind _) +\Rightarrow f0 | (Flat f1) \Rightarrow f1])])) (CHead c0 (Flat f0) u) (CHead +c1 (Flat f) v) H3) in ((let H6 \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 (Flat f0) u) (CHead c1 (Flat f) v) H3) in (\lambda +(_: (eq F f0 f)).(\lambda (H8: (eq C c0 c1)).(let H9 \def (eq_ind C c0 +(\lambda (c: C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c2))) H2 c1 H8) +in (let H10 \def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H8) in +H10))))) H5)) H4))))))))) y x H0))) H)))))). + +theorem wf3_gen_head2: + \forall (g: G).(\forall (x: C).(\forall (c: C).(\forall (v: T).(\forall (k: +K).((wf3 g x (CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))))) +\def + \lambda (g: G).(\lambda (x: C).(\lambda (c: C).(\lambda (v: T).(\lambda (k: +K).(\lambda (H: (wf3 g x (CHead c k v))).(insert_eq C (CHead c k v) (\lambda +(c0: C).(wf3 g x c0)) (\lambda (_: C).(ex B (\lambda (b: B).(eq K k (Bind +b))))) (\lambda (y: C).(\lambda (H0: (wf3 g x y)).(wf3_ind g (\lambda (_: +C).(\lambda (c1: C).((eq C c1 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K +k (Bind b))))))) (\lambda (m: nat).(\lambda (H1: (eq C (CSort m) (CHead c k +v))).(let H2 \def (eq_ind C (CSort m) (\lambda (ee: C).(match ee in C return +(\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) +\Rightarrow False])) I (CHead c k v) H1) in (False_ind (ex B (\lambda (b: +B).(eq K k (Bind b)))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: +(wf3 g c1 c2)).(\lambda (H2: (((eq C c2 (CHead c k v)) \to (ex B (\lambda (b: +B).(eq K k (Bind b))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H3: (ty3 +g c1 u t)).(\lambda (b: B).(\lambda (H4: (eq C (CHead c2 (Bind b) u) (CHead c +k v))).(let H5 \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 b) u) (CHead c k v) H4) in ((let H6 \def +(f_equal C K (\lambda (e: C).(match e in C return (\lambda (_: C).K) with +[(CSort _) \Rightarrow (Bind b) | (CHead _ k0 _) \Rightarrow k0])) (CHead c2 +(Bind b) u) (CHead c k v) H4) in ((let H7 \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 b) u) (CHead c k v) H4) in +(\lambda (H8: (eq K (Bind b) k)).(\lambda (H9: (eq C c2 c)).(let H10 \def +(eq_ind T u (\lambda (t0: T).(ty3 g c1 t0 t)) H3 v H7) in (let H11 \def +(eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex B (\lambda +(b0: B).(eq K k (Bind b0)))))) H2 c H9) in (let H12 \def (eq_ind C c2 +(\lambda (c0: C).(wf3 g c1 c0)) H1 c H9) in (let H13 \def (eq_ind_r K k +(\lambda (k0: K).((eq C c (CHead c k0 v)) \to (ex B (\lambda (b0: B).(eq K k0 +(Bind b0)))))) H11 (Bind b) H8) in (eq_ind K (Bind b) (\lambda (k0: K).(ex B +(\lambda (b0: B).(eq K k0 (Bind b0))))) (ex_intro B (\lambda (b0: B).(eq K +(Bind b) (Bind b0))) b (refl_equal K (Bind b))) k H8)))))))) H6)) +H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 +c2)).(\lambda (H2: (((eq C c2 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K +k (Bind b))))))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u +t) \to False)))).(\lambda (_: B).(\lambda (H4: (eq C (CHead c2 (Bind Void) +(TSort O)) (CHead c k v))).(let H5 \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 Void) (TSort O)) (CHead c k v) H4) in +((let H6 \def (f_equal C K (\lambda (e: C).(match e in C return (\lambda (_: +C).K) with [(CSort _) \Rightarrow (Bind Void) | (CHead _ k0 _) \Rightarrow +k0])) (CHead c2 (Bind Void) (TSort O)) (CHead c k v) H4) in ((let H7 \def +(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with +[(CSort _) \Rightarrow (TSort O) | (CHead _ _ t) \Rightarrow t])) (CHead c2 +(Bind Void) (TSort O)) (CHead c k v) H4) in (\lambda (H8: (eq K (Bind Void) +k)).(\lambda (H9: (eq C c2 c)).(let H10 \def (eq_ind C c2 (\lambda (c0: +C).((eq C c0 (CHead c k v)) \to (ex B (\lambda (b0: B).(eq K k (Bind b0)))))) +H2 c H9) in (let H11 \def (eq_ind C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c +H9) in (let H12 \def (eq_ind_r K k (\lambda (k0: K).((eq C c (CHead c k0 v)) +\to (ex B (\lambda (b0: B).(eq K k0 (Bind b0)))))) H10 (Bind Void) H8) in +(eq_ind K (Bind Void) (\lambda (k0: K).(ex B (\lambda (b0: B).(eq K k0 (Bind +b0))))) (let H13 \def (eq_ind_r T v (\lambda (t: T).((eq C c (CHead c (Bind +Void) t)) \to (ex B (\lambda (b0: B).(eq K (Bind Void) (Bind b0)))))) H12 +(TSort O) H7) in (ex_intro B (\lambda (b0: B).(eq K (Bind Void) (Bind b0))) +Void (refl_equal K (Bind Void)))) k H8))))))) H6)) H5)))))))))) (\lambda (c1: +C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C c2 +(CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))).(\lambda (_: +T).(\lambda (_: F).(\lambda (H3: (eq C c2 (CHead c k v))).(let H4 \def +(f_equal C C (\lambda (e: C).e) c2 (CHead c k v) H3) in (let H5 \def (eq_ind +C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex B (\lambda (b: B).(eq +K k (Bind b)))))) H2 (CHead c k v) H4) in (let H6 \def (eq_ind C c2 (\lambda +(c0: C).(wf3 g c1 c0)) H1 (CHead c k v) H4) in (H5 (refl_equal C (CHead c k +v))))))))))))) x y H0))) H)))))). + diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/getl.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/getl.ma new file mode 100644 index 000000000..08fd20cfd --- /dev/null +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/getl.ma @@ -0,0 +1,199 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +include "LambdaDelta-1/wf3/clear.ma". + +include "LambdaDelta-1/ty3/dec.ma". + +theorem wf3_getl_conf: + \forall (b: B).(\forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall +(v: T).((getl i c1 (CHead d1 (Bind b) v)) \to (\forall (g: G).(\forall (c2: +C).((wf3 g c1 c2) \to (\forall (w: T).((ty3 g d1 v w) \to (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 +d2))))))))))))) +\def + \lambda (b: B).(\lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: +C).(\forall (d1: C).(\forall (v: T).((getl n c1 (CHead d1 (Bind b) v)) \to +(\forall (g: G).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (w: T).((ty3 g +d1 v w) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind b) v))) +(\lambda (d2: C).(wf3 g d1 d2))))))))))))) (\lambda (c1: C).(\lambda (d1: +C).(\lambda (v: T).(\lambda (H: (getl O c1 (CHead d1 (Bind b) v))).(\lambda +(g: G).(\lambda (c2: C).(\lambda (H0: (wf3 g c1 c2)).(\lambda (w: T).(\lambda +(H1: (ty3 g d1 v w)).(let H_y \def (wf3_clear_conf c1 (CHead d1 (Bind b) v) +(getl_gen_O c1 (CHead d1 (Bind b) v) H) g c2 H0) in (let H_x \def +(wf3_gen_bind1 g d1 c2 v b H_y) in (let H2 \def H_x in (or_ind (ex3_2 C T +(\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda +(c3: C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 +g d1 v w0)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort +O)))) (\lambda (c3: C).(wf3 g d1 c3)) (\lambda (_: C).(\forall (w0: T).((ty3 +g d1 v w0) \to False)))) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind +b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (H3: (ex3_2 C T (\lambda +(c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: +C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g d1 +v w0))))).(ex3_2_ind C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 +(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: +C).(\lambda (w0: T).(ty3 g d1 v w0))) (ex2 C (\lambda (d2: C).(getl O c2 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H4: (eq C c2 (CHead x0 (Bind b) v))).(\lambda +(H5: (wf3 g d1 x0)).(\lambda (_: (ty3 g d1 v x1)).(eq_ind_r C (CHead x0 (Bind +b) v) (\lambda (c: C).(ex2 C (\lambda (d2: C).(getl O c (CHead d2 (Bind b) +v))) (\lambda (d2: C).(wf3 g d1 d2)))) (ex_intro2 C (\lambda (d2: C).(getl O +(CHead x0 (Bind b) v) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)) +x0 (getl_refl b x0 v) H5) c2 H4)))))) H3)) (\lambda (H3: (ex3 C (\lambda (c3: +C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g d1 +c3)) (\lambda (_: C).(\forall (w0: T).((ty3 g d1 v w0) \to +False))))).(ex3_ind C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort +O)))) (\lambda (c3: C).(wf3 g d1 c3)) (\lambda (_: C).(\forall (w0: T).((ty3 +g d1 v w0) \to False))) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind b) +v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: C).(\lambda (H4: (eq C c2 +(CHead x0 (Bind Void) (TSort O)))).(\lambda (_: (wf3 g d1 x0)).(\lambda (H6: +((\forall (w0: T).((ty3 g d1 v w0) \to False)))).(eq_ind_r C (CHead x0 (Bind +Void) (TSort O)) (\lambda (c: C).(ex2 C (\lambda (d2: C).(getl O c (CHead d2 +(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H6 w H1) in +(let H7 \def H_x0 in (False_ind (ex2 C (\lambda (d2: C).(getl O (CHead x0 +(Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 +d2))) H7))) c2 H4))))) H3)) H2))))))))))))) (\lambda (n: nat).(\lambda (H: +((\forall (c1: C).(\forall (d1: C).(\forall (v: T).((getl n c1 (CHead d1 +(Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c1 c2) \to (\forall +(w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind +b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))))))))))).(\lambda (c1: C).(C_ind +(\lambda (c: C).(\forall (d1: C).(\forall (v: T).((getl (S n) c (CHead d1 +(Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c c2) \to (\forall +(w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 +(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))))))))) (\lambda (n0: +nat).(\lambda (d1: C).(\lambda (v: T).(\lambda (H0: (getl (S n) (CSort n0) +(CHead d1 (Bind b) v))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (wf3 g +(CSort n0) c2)).(\lambda (w: T).(\lambda (_: (ty3 g d1 v w)).(getl_gen_sort +n0 (S n) (CHead d1 (Bind b) v) H0 (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))))))))))))) (\lambda +(c: C).(\lambda (H0: ((\forall (d1: C).(\forall (v: T).((getl (S n) c (CHead +d1 (Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c c2) \to +(\forall (w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))))))))))))).(\lambda +(k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (v: T).(\lambda (H1: (getl +(S n) (CHead c k t) (CHead d1 (Bind b) v))).(\lambda (g: G).(\lambda (c2: +C).(\lambda (H2: (wf3 g (CHead c k t) c2)).(\lambda (w: T).(\lambda (H3: (ty3 +g d1 v w)).(K_ind (\lambda (k0: K).((wf3 g (CHead c k0 t) c2) \to ((getl (r +k0 n) c (CHead d1 (Bind b) v)) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))) (\lambda (b0: +B).(\lambda (H4: (wf3 g (CHead c (Bind b0) t) c2)).(\lambda (H5: (getl (r +(Bind b0) n) c (CHead d1 (Bind b) v))).(let H_x \def (wf3_gen_bind1 g c c2 t +b0 H4) in (let H6 \def H_x in (or_ind (ex3_2 C T (\lambda (c3: C).(\lambda +(_: T).(eq C c2 (CHead c3 (Bind b0) t)))) (\lambda (c3: C).(\lambda (_: +T).(wf3 g c c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g c t w0)))) (ex3 C +(\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: +C).(wf3 g c c3)) (\lambda (_: C).(\forall (w0: T).((ty3 g c t w0) \to +False)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind b) v))) +(\lambda (d2: C).(wf3 g d1 d2))) (\lambda (H7: (ex3_2 C T (\lambda (c3: +C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b0) t)))) (\lambda (c3: +C).(\lambda (_: T).(wf3 g c c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g c t +w0))))).(ex3_2_ind C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 +(Bind b0) t)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c c3))) (\lambda (_: +C).(\lambda (w0: T).(ty3 g c t w0))) (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H8: (eq C c2 (CHead x0 (Bind b0) t))).(\lambda +(H9: (wf3 g c x0)).(\lambda (_: (ty3 g c t x1)).(eq_ind_r C (CHead x0 (Bind +b0) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(getl (S n) c0 (CHead d2 +(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H c d1 v H5 g +x0 H9 w H3) in (let H11 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl n x0 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)) (ex2 C (\lambda (d2: +C).(getl (S n) (CHead x0 (Bind b0) t) (CHead d2 (Bind b) v))) (\lambda (d2: +C).(wf3 g d1 d2))) (\lambda (x: C).(\lambda (H12: (getl n x0 (CHead x (Bind +b) v))).(\lambda (H13: (wf3 g d1 x)).(ex_intro2 C (\lambda (d2: C).(getl (S +n) (CHead x0 (Bind b0) t) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 +d2)) x (getl_head (Bind b0) n x0 (CHead x (Bind b) v) H12 t) H13)))) H11))) +c2 H8)))))) H7)) (\lambda (H7: (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 +(Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c c3)) (\lambda (_: +C).(\forall (w0: T).((ty3 g c t w0) \to False))))).(ex3_ind C (\lambda (c3: +C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c c3)) +(\lambda (_: C).(\forall (w0: T).((ty3 g c t w0) \to False))) (ex2 C (\lambda +(d2: C).(getl (S n) c2 (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 +d2))) (\lambda (x0: C).(\lambda (H8: (eq C c2 (CHead x0 (Bind Void) (TSort +O)))).(\lambda (H9: (wf3 g c x0)).(\lambda (_: ((\forall (w0: T).((ty3 g c t +w0) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda (c0: +C).(ex2 C (\lambda (d2: C).(getl (S n) c0 (CHead d2 (Bind b) v))) (\lambda +(d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H c d1 v H5 g x0 H9 w H3) in (let +H11 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl n x0 (CHead d2 (Bind b) +v))) (\lambda (d2: C).(wf3 g d1 d2)) (ex2 C (\lambda (d2: C).(getl (S n) +(CHead x0 (Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: +C).(wf3 g d1 d2))) (\lambda (x: C).(\lambda (H12: (getl n x0 (CHead x (Bind +b) v))).(\lambda (H13: (wf3 g d1 x)).(ex_intro2 C (\lambda (d2: C).(getl (S +n) (CHead x0 (Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: +C).(wf3 g d1 d2)) x (getl_head (Bind Void) n x0 (CHead x (Bind b) v) H12 +(TSort O)) H13)))) H11))) c2 H8))))) H7)) H6)))))) (\lambda (f: F).(\lambda +(H4: (wf3 g (CHead c (Flat f) t) c2)).(\lambda (H5: (getl (r (Flat f) n) c +(CHead d1 (Bind b) v))).(let H_y \def (wf3_gen_flat1 g c c2 t f H4) in (H0 d1 +v H5 g c2 H_y w H3))))) k H2 (getl_gen_S k c (CHead d1 (Bind b) v) t n +H1)))))))))))))) c1)))) i)). + +theorem getl_wf3_trans: + \forall (i: nat).(\forall (c1: C).(\forall (d1: C).((getl i c1 d1) \to +(\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: +C).(wf3 g c1 c2)) (\lambda (c2: C).(getl i c2 d2))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: +C).((getl n c1 d1) \to (\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to +(ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl n c2 +d2)))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (H: (getl O c1 +d1)).(\lambda (g: G).(\lambda (d2: C).(\lambda (H0: (wf3 g d1 d2)).(let H_x +\def (clear_wf3_trans c1 d1 (getl_gen_O c1 d1 H) g d2 H0) in (let H1 \def H_x +in (ex2_ind C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(clear c2 d2)) +(ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl O c2 d2))) +(\lambda (x: C).(\lambda (H2: (wf3 g c1 x)).(\lambda (H3: (clear x +d2)).(ex_intro2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl O c2 +d2)) x H2 (getl_intro O x d2 x (drop_refl x) H3))))) H1))))))))) (\lambda (n: +nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).((getl n c1 d1) \to +(\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: +C).(wf3 g c1 c2)) (\lambda (c2: C).(getl n c2 d2))))))))))).(\lambda (c1: +C).(C_ind (\lambda (c: C).(\forall (d1: C).((getl (S n) c d1) \to (\forall +(g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: C).(wf3 g c +c2)) (\lambda (c2: C).(getl (S n) c2 d2))))))))) (\lambda (n0: nat).(\lambda +(d1: C).(\lambda (H0: (getl (S n) (CSort n0) d1)).(\lambda (g: G).(\lambda +(d2: C).(\lambda (_: (wf3 g d1 d2)).(getl_gen_sort n0 (S n) d1 H0 (ex2 C +(\lambda (c2: C).(wf3 g (CSort n0) c2)) (\lambda (c2: C).(getl (S n) c2 +d2)))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).((getl (S n) c +d1) \to (\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda +(c2: C).(wf3 g c c2)) (\lambda (c2: C).(getl (S n) c2 d2)))))))))).(\lambda +(k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (H1: (getl (S n) (CHead c k +t) d1)).(\lambda (g: G).(\lambda (d2: C).(\lambda (H2: (wf3 g d1 d2)).(K_ind +(\lambda (k0: K).((getl (r k0 n) c d1) \to (ex2 C (\lambda (c2: C).(wf3 g +(CHead c k0 t) c2)) (\lambda (c2: C).(getl (S n) c2 d2))))) (\lambda (b: +B).(\lambda (H3: (getl (r (Bind b) n) c d1)).(let H_x \def (H c d1 H3 g d2 +H2) in (let H4 \def H_x in (ex2_ind C (\lambda (c2: C).(wf3 g c c2)) (\lambda +(c2: C).(getl n c2 d2)) (ex2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) +c2)) (\lambda (c2: C).(getl (S n) c2 d2))) (\lambda (x: C).(\lambda (H5: (wf3 +g c x)).(\lambda (H6: (getl n x d2)).(let H_x0 \def (ty3_inference g c t) in +(let H7 \def H_x0 in (or_ind (ex T (\lambda (t2: T).(ty3 g c t t2))) (\forall +(t2: T).((ty3 g c t t2) \to False)) (ex2 C (\lambda (c2: C).(wf3 g (CHead c +(Bind b) t) c2)) (\lambda (c2: C).(getl (S n) c2 d2))) (\lambda (H8: (ex T +(\lambda (t2: T).(ty3 g c t t2)))).(ex_ind T (\lambda (t2: T).(ty3 g c t t2)) +(ex2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) (\lambda (c2: +C).(getl (S n) c2 d2))) (\lambda (x0: T).(\lambda (H9: (ty3 g c t +x0)).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) (\lambda +(c2: C).(getl (S n) c2 d2)) (CHead x (Bind b) t) (wf3_bind g c x H5 t x0 H9 +b) (getl_head (Bind b) n x d2 H6 t)))) H8)) (\lambda (H8: ((\forall (t2: +T).((ty3 g c t t2) \to False)))).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead +c (Bind b) t) c2)) (\lambda (c2: C).(getl (S n) c2 d2)) (CHead x (Bind Void) +(TSort O)) (wf3_void g c x H5 t H8 b) (getl_head (Bind Void) n x d2 H6 (TSort +O)))) H7)))))) H4))))) (\lambda (f: F).(\lambda (H3: (getl (r (Flat f) n) c +d1)).(let H_x \def (H0 d1 H3 g d2 H2) in (let H4 \def H_x in (ex2_ind C +(\lambda (c2: C).(wf3 g c c2)) (\lambda (c2: C).(getl (S n) c2 d2)) (ex2 C +(\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) (\lambda (c2: C).(getl (S +n) c2 d2))) (\lambda (x: C).(\lambda (H5: (wf3 g c x)).(\lambda (H6: (getl (S +n) x d2)).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) +(\lambda (c2: C).(getl (S n) c2 d2)) x (wf3_flat g c x H5 t f) H6)))) H4))))) +k (getl_gen_S k c d1 t n H1))))))))))) c1)))) i). + diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/props.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/props.ma new file mode 100644 index 000000000..0e492dff8 --- /dev/null +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/props.ma @@ -0,0 +1,146 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +include "LambdaDelta-1/wf3/ty3.ma". + +theorem wf3_mono: + \forall (g: G).(\forall (c: C).(\forall (c1: C).((wf3 g c c1) \to (\forall +(c2: C).((wf3 g c c2) \to (eq C c1 c2)))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (c1: C).(\lambda (H: (wf3 g c +c1)).(wf3_ind g (\lambda (c0: C).(\lambda (c2: C).(\forall (c3: C).((wf3 g c0 +c3) \to (eq C c2 c3))))) (\lambda (m: nat).(\lambda (c2: C).(\lambda (H0: +(wf3 g (CSort m) c2)).(let H_y \def (wf3_gen_sort1 g c2 m H0) in (eq_ind_r C +(CSort m) (\lambda (c0: C).(eq C (CSort m) c0)) (refl_equal C (CSort m)) c2 +H_y))))) (\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2 +c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3 +c4))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H2: (ty3 g c2 u +t)).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g (CHead c2 (Bind b) +u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in (let H4 \def H_x in +(or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind +b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: +C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq C c0 (CHead +c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: +C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3 (Bind b) u) +c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead +c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda +(_: C).(\lambda (w: T).(ty3 g c2 u w))))).(ex3_2_ind C T (\lambda (c4: +C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4: +C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2 +u w))) (eq C (CHead c3 (Bind b) u) c0) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (H6: (eq C c0 (CHead x0 (Bind b) u))).(\lambda (H7: (wf3 g c2 +x0)).(\lambda (_: (ty3 g c2 u x1)).(eq_ind_r C (CHead x0 (Bind b) u) (\lambda +(c4: C).(eq C (CHead c3 (Bind b) u) c4)) (f_equal3 C K T C CHead c3 x0 (Bind +b) (Bind b) u u (H1 x0 H7) (refl_equal K (Bind b)) (refl_equal T u)) c0 +H6)))))) H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind +Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall +(w: T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0 +(CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda +(_: C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind b) +u) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void) (TSort +O)))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: ((\forall (w: T).((ty3 g c2 u +w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda (c4: +C).(eq C (CHead c3 (Bind b) u) c4)) (let H_x0 \def (H8 t H2) in (let H9 \def +H_x0 in (False_ind (eq C (CHead c3 (Bind b) u) (CHead x0 (Bind Void) (TSort +O))) H9))) c0 H6))))) H5)) H4))))))))))))) (\lambda (c2: C).(\lambda (c3: +C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4) +\to (eq C c3 c4))))).(\lambda (u: T).(\lambda (H2: ((\forall (t: T).((ty3 g +c2 u t) \to False)))).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g +(CHead c2 (Bind b) u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in +(let H4 \def H_x in (or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C +c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) +(\lambda (_: C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq +C c0 (CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) +(\lambda (_: C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3 +(Bind Void) (TSort O)) c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda +(_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: +T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2 u +w))))).(ex3_2_ind C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4 +(Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: +C).(\lambda (w: T).(ty3 g c2 u w))) (eq C (CHead c3 (Bind Void) (TSort O)) +c0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c0 (CHead x0 (Bind +b) u))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: (ty3 g c2 u x1)).(eq_ind_r +C (CHead x0 (Bind b) u) (\lambda (c4: C).(eq C (CHead c3 (Bind Void) (TSort +O)) c4)) (let H_x0 \def (H2 x1 H8) in (let H9 \def H_x0 in (False_ind (eq C +(CHead c3 (Bind Void) (TSort O)) (CHead x0 (Bind b) u)) H9))) c0 H6)))))) +H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind Void) +(TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall (w: +T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0 (CHead +c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: +C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind Void) +(TSort O)) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void) +(TSort O)))).(\lambda (H7: (wf3 g c2 x0)).(\lambda (_: ((\forall (w: T).((ty3 +g c2 u w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda +(c4: C).(eq C (CHead c3 (Bind Void) (TSort O)) c4)) (f_equal3 C K T C CHead +c3 x0 (Bind Void) (Bind Void) (TSort O) (TSort O) (H1 x0 H7) (refl_equal K +(Bind Void)) (refl_equal T (TSort O))) c0 H6))))) H5)) H4)))))))))))) +(\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1: +((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3 c4))))).(\lambda (u: +T).(\lambda (f: F).(\lambda (c0: C).(\lambda (H2: (wf3 g (CHead c2 (Flat f) +u) c0)).(let H_y \def (wf3_gen_flat1 g c2 c0 u f H2) in (H1 c0 H_y)))))))))) +c c1 H)))). + +theorem wf3_total: + \forall (g: G).(\forall (c1: C).(ex C (\lambda (c2: C).(wf3 g c1 c2)))) +\def + \lambda (g: G).(\lambda (c1: C).(C_ind (\lambda (c: C).(ex C (\lambda (c2: +C).(wf3 g c c2)))) (\lambda (n: nat).(ex_intro C (\lambda (c2: C).(wf3 g +(CSort n) c2)) (CSort n) (wf3_sort g n))) (\lambda (c: C).(\lambda (H: (ex C +(\lambda (c2: C).(wf3 g c c2)))).(\lambda (k: K).(\lambda (t: T).(let H0 \def +H in (ex_ind C (\lambda (c2: C).(wf3 g c c2)) (ex C (\lambda (c2: C).(wf3 g +(CHead c k t) c2))) (\lambda (x: C).(\lambda (H1: (wf3 g c x)).(K_ind +(\lambda (k0: K).(ex C (\lambda (c2: C).(wf3 g (CHead c k0 t) c2)))) (\lambda +(b: B).(let H_x \def (ty3_inference g c t) in (let H2 \def H_x in (or_ind (ex +T (\lambda (t2: T).(ty3 g c t t2))) (\forall (t2: T).((ty3 g c t t2) \to +False)) (ex C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2))) (\lambda +(H3: (ex T (\lambda (t2: T).(ty3 g c t t2)))).(ex_ind T (\lambda (t2: T).(ty3 +g c t t2)) (ex C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2))) (\lambda +(x0: T).(\lambda (H4: (ty3 g c t x0)).(ex_intro C (\lambda (c2: C).(wf3 g +(CHead c (Bind b) t) c2)) (CHead x (Bind b) t) (wf3_bind g c x H1 t x0 H4 +b)))) H3)) (\lambda (H3: ((\forall (t2: T).((ty3 g c t t2) \to +False)))).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) +(CHead x (Bind Void) (TSort O)) (wf3_void g c x H1 t H3 b))) H2)))) (\lambda +(f: F).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) x +(wf3_flat g c x H1 t f))) k))) H0)))))) c1)). + +theorem wf3_idem: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (wf3 g +c2 c2)))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wf3 g c1 +c2)).(wf3_ind g (\lambda (_: C).(\lambda (c0: C).(wf3 g c0 c0))) (\lambda (m: +nat).(wf3_sort g m)) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wf3 g +c3 c4)).(\lambda (H1: (wf3 g c4 c4)).(\lambda (u: T).(\lambda (t: T).(\lambda +(H2: (ty3 g c3 u t)).(\lambda (b: B).(wf3_bind g c4 c4 H1 u t (wf3_ty3_conf g +c3 u t H2 c4 H0) b))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (_: +(wf3 g c3 c4)).(\lambda (H1: (wf3 g c4 c4)).(\lambda (u: T).(\lambda (_: +((\forall (t: T).((ty3 g c3 u t) \to False)))).(\lambda (_: B).(wf3_bind g c4 +c4 H1 (TSort O) (TSort (next g O)) (ty3_sort g c4 O) Void)))))))) (\lambda +(c3: C).(\lambda (c4: C).(\lambda (_: (wf3 g c3 c4)).(\lambda (H1: (wf3 g c4 +c4)).(\lambda (_: T).(\lambda (_: F).H1)))))) c1 c2 H)))). + +theorem wf3_ty3: + \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (u: T).((ty3 g c1 t +u) \to (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(ty3 g c2 t +u))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: +(ty3 g c1 t u)).(let H_x \def (wf3_total g c1) in (let H0 \def H_x in (ex_ind +C (\lambda (c2: C).(wf3 g c1 c2)) (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) +(\lambda (c2: C).(ty3 g c2 t u))) (\lambda (x: C).(\lambda (H1: (wf3 g c1 +x)).(ex_intro2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(ty3 g c2 t +u)) x H1 (wf3_ty3_conf g c1 t u H x H1)))) H0))))))). + diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/ty3.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/ty3.ma new file mode 100644 index 000000000..1a348324b --- /dev/null +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/ty3.ma @@ -0,0 +1,126 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +include "LambdaDelta-1/wf3/getl.ma". + +theorem wf3_pr2_conf: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr2 c1 +t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t1 +u) \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).((wf3 g c c2) \to (\forall (u: T).((ty3 g c t u) \to (pr2 +c2 t t0)))))))) (\lambda (c: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda +(H0: (pr0 t3 t4)).(\lambda (c2: C).(\lambda (_: (wf3 g c c2)).(\lambda (u: +T).(\lambda (_: (ty3 g c t3 u)).(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: (wf3 g c c2)).(\lambda (u0: T).(\lambda (H4: (ty3 g c t3 +u0)).(let H_y \def (ty3_sred_pr0 t3 t4 H1 g c u0 H4) in (let H_x \def +(ty3_getl_subst0 g c t4 u0 H_y u t i H2 Abbr d u H0) in (let H5 \def H_x in +(ex_ind T (\lambda (w: T).(ty3 g d u w)) (pr2 c2 t3 t) (\lambda (x: +T).(\lambda (H6: (ty3 g d u x)).(let H_x0 \def (wf3_getl_conf Abbr i c d u H0 +g c2 H3 x H6) in (let H7 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(wf3 g d d2)) (pr2 c2 t3 t) +(\lambda (x0: C).(\lambda (H8: (getl i c2 (CHead x0 (Bind Abbr) u))).(\lambda +(_: (wf3 g d x0)).(pr2_delta c2 x0 u i H8 t3 t4 H1 t H2)))) H7))))) +H5)))))))))))))))))) c1 t1 t2 H))))). + +theorem wf3_pr3_conf: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr3 c1 +t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t1 +u) \to (pr3 c2 t1 t2))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (pr3 c1 t1 t2)).(pr3_ind c1 (\lambda (t: T).(\lambda (t0: T).(\forall +(c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t u) \to (pr3 c2 t +t0))))))) (\lambda (t: T).(\lambda (c2: C).(\lambda (_: (wf3 g c1 +c2)).(\lambda (u: T).(\lambda (_: (ty3 g c1 t u)).(pr3_refl c2 t)))))) +(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr2 c1 t4 t3)).(\lambda (t5: +T).(\lambda (_: (pr3 c1 t3 t5)).(\lambda (H2: ((\forall (c2: C).((wf3 g c1 +c2) \to (\forall (u: T).((ty3 g c1 t3 u) \to (pr3 c2 t3 t5))))))).(\lambda +(c2: C).(\lambda (H3: (wf3 g c1 c2)).(\lambda (u: T).(\lambda (H4: (ty3 g c1 +t4 u)).(pr3_sing c2 t3 t4 (wf3_pr2_conf g c1 t4 t3 H0 c2 H3 u H4) t5 (H2 c2 +H3 u (ty3_sred_pr2 c1 t4 t3 H0 g u H4))))))))))))) t1 t2 H))))). + +theorem wf3_pc3_conf: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pc3 c1 +t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u1: T).((ty3 g c1 t1 +u1) \to (\forall (u2: T).((ty3 g c1 t2 u2) \to (pc3 c2 t1 t2))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (pc3 c1 t1 t2)).(\lambda (c2: C).(\lambda (H0: (wf3 g c1 c2)).(\lambda +(u1: T).(\lambda (H1: (ty3 g c1 t1 u1)).(\lambda (u2: T).(\lambda (H2: (ty3 g +c1 t2 u2)).(let H3 \def H in (ex2_ind T (\lambda (t: T).(pr3 c1 t1 t)) +(\lambda (t: T).(pr3 c1 t2 t)) (pc3 c2 t1 t2) (\lambda (x: T).(\lambda (H4: +(pr3 c1 t1 x)).(\lambda (H5: (pr3 c1 t2 x)).(pc3_pr3_t c2 t1 x (wf3_pr3_conf +g c1 t1 x H4 c2 H0 u1 H1) t2 (wf3_pr3_conf g c1 t2 x H5 c2 H0 u2 H2))))) +H3)))))))))))). + +theorem wf3_ty3_conf: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1 +t1 t2) \to (\forall (c2: C).((wf3 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).((wf3 g c c2) \to (ty3 g c2 t t0)))))) (\lambda (c: +C).(\lambda (t3: T).(\lambda (t: T).(\lambda (H0: (ty3 g c t3 t)).(\lambda +(H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t3 t))))).(\lambda (u: +T).(\lambda (t4: T).(\lambda (H2: (ty3 g c u t4)).(\lambda (H3: ((\forall +(c2: C).((wf3 g c c2) \to (ty3 g c2 u t4))))).(\lambda (H4: (pc3 c t4 +t3)).(\lambda (c2: C).(\lambda (H5: (wf3 g c c2)).(ex_ind T (\lambda (t0: +T).(ty3 g c t4 t0)) (ty3 g c2 u t3) (\lambda (x: T).(\lambda (H6: (ty3 g c t4 +x)).(ty3_conv g c2 t3 t (H1 c2 H5) u t4 (H3 c2 H5) (wf3_pc3_conf g c t4 t3 H4 +c2 H5 x H6 t H0)))) (ty3_correct g c u t4 H2)))))))))))))) (\lambda (c: +C).(\lambda (m: nat).(\lambda (c2: C).(\lambda (_: (wf3 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 +(H1: (ty3 g d u t)).(\lambda (H2: ((\forall (c2: C).((wf3 g d c2) \to (ty3 g +c2 u t))))).(\lambda (c2: C).(\lambda (H3: (wf3 g c c2)).(let H_x \def +(wf3_getl_conf Abbr n c d u H0 g c2 H3 t H1) in (let H4 \def H_x in (ex2_ind +C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(wf3 g d d2)) (ty3 g c2 (TLRef n) (lift (S n) O t)) (\lambda (x: +C).(\lambda (H5: (getl n c2 (CHead x (Bind Abbr) u))).(\lambda (H6: (wf3 g d +x)).(ty3_abbr g n c2 x u H5 t (H2 x H6))))) 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 (H1: (ty3 g d u +t)).(\lambda (H2: ((\forall (c2: C).((wf3 g d c2) \to (ty3 g c2 u +t))))).(\lambda (c2: C).(\lambda (H3: (wf3 g c c2)).(let H_x \def +(wf3_getl_conf Abst n c d u H0 g c2 H3 t H1) in (let H4 \def H_x in (ex2_ind +C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(wf3 g d d2)) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda (x: +C).(\lambda (H5: (getl n c2 (CHead x (Bind Abst) u))).(\lambda (H6: (wf3 g d +x)).(ty3_abst g n c2 x u H5 t (H2 x H6))))) H4))))))))))))) (\lambda (c: +C).(\lambda (u: T).(\lambda (t: T).(\lambda (H0: (ty3 g c u t)).(\lambda (H1: +((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 u t))))).(\lambda (b: +B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) +t3 t4)).(\lambda (H3: ((\forall (c2: C).((wf3 g (CHead c (Bind b) u) c2) \to +(ty3 g c2 t3 t4))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c c2)).(ty3_bind g +c2 u t (H1 c2 H4) b t3 t4 (H3 (CHead c2 (Bind b) u) (wf3_bind g c c2 H4 u t +H0 b))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda +(_: (ty3 g c w u)).(\lambda (H1: ((\forall (c2: C).((wf3 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).((wf3 g c c2) \to (ty3 g +c2 v (THead (Bind Abst) u t)))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c +c2)).(ty3_appl g c2 w u (H1 c2 H4) v t (H3 c2 H4))))))))))))) (\lambda (c: +C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g c t3 t4)).(\lambda +(H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t3 t4))))).(\lambda (t0: +T).(\lambda (_: (ty3 g c t4 t0)).(\lambda (H3: ((\forall (c2: C).((wf3 g c +c2) \to (ty3 g c2 t4 t0))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c +c2)).(ty3_cast g c2 t3 t4 (H1 c2 H4) t0 (H3 c2 H4)))))))))))) c1 t1 t2 H))))). + diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Makefile b/helm/software/matita/contribs/LAMBDA-TYPES/Makefile index 89f98d24e..c0805522d 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Makefile +++ b/helm/software/matita/contribs/LAMBDA-TYPES/Makefile @@ -6,7 +6,7 @@ DIR=$(shell basename $$PWD) MMAS = $(shell find Base-2 -name "*.mma") MAS = $(MMAS:%.mma=%.ma) -XMAS = Base-2/theory.ma +XMAS = Base-2/theory.ma LambdaDelta-2/theory.ma $(DIR) all: depends $(H)$(MAKE) H=$(H) --no-print-directory build @@ -25,15 +25,15 @@ build.opt: $(MAS) $(H)rm depends clean: - $(H)../../matitaclean + $(H)../../matitaclean $(MATITAOPTIONS) $(H)rm -f $(MAS) depends clean.opt: - $(H)../../matitaclean.opt + $(H)../../matitaclean.opt $(MATITAOPTIONS) $(H)rm -f $(MAS) depends clean.ma: - $(H)../../matitaclean.opt $(MAS) + $(H)../../matitaclean.opt $(MATITAOPTIONS) $(MAS) $(H)rm -f $(MAS) depends depend: diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/defs.ma b/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/defs.ma deleted file mode 100644 index 32b8a5f67..000000000 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/defs.ma +++ /dev/null @@ -1,35 +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 *) -(* *) -(**************************************************************************) - -(* LIFT RELATION - - Usage: invoke with positive polarity -*) - -include "Unified-Sub/datatypes/Term.ma". - -inductive Lift (l: Nat): Nat \to Term \to Term \to Prop \def - | lift_sort : \forall i,h. - Lift l i (sort h) (sort h) - | lift_lref_gt: \forall i,j. i > j \to - Lift l i (lref j) (lref j) - | lift_lref_le: \forall i,j1. i <= j1 \to - \forall j2. (l + j1 == j2) \to - Lift l i (lref j1) (lref j2) - | lift_bind : \forall i,u1,u2. Lift l i u1 u2 \to - \forall t1,t2. Lift l (succ i) t1 t2 \to - \forall r. Lift l i (intb r u1 t1) (intb r u2 t2) - | lift_flat : \forall i,u1,u2. Lift l i u1 u2 \to - \forall t1,t2. Lift l i t1 t2 \to - \forall r. Lift l i (intf r u1 t1) (intf r u2 t2) -. diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/fun.ma b/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/fun.ma deleted file mode 100644 index 08d6704b2..000000000 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/fun.ma +++ /dev/null @@ -1,55 +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 *) -(* *) -(**************************************************************************) - -include "Unified-Sub/Lift/inv.ma". - -(* Functional properties ****************************************************) - -theorem lift_total: \forall l, t, i. \exists u. Lift l i t u. - intros 2. elim t; clear t; - [ autobatch - | lapply (nle_gt_or_le n i). decompose; - [ autobatch - | lapply (nplus_total l n). decompose. autobatch - ] - | lapply (H i1). lapply (H1 (succ i1)). decompose. autobatch - | lapply (H i1). lapply (H1 i1). decompose. autobatch - ]. -qed. - -theorem lift_mono: \forall l,i,t,t1. Lift l i t t1 \to - \forall t2. Lift l i t t2 \to - t1 = t2. - intros 5. elim H; clear H i t t1; - [ lapply linear lift_inv_sort_1 to H1 - | lapply linear lift_inv_lref_1_gt to H2, H1 - | lapply linear lift_inv_lref_1_le_nplus to H3, H1, H2 - | lapply linear lift_inv_bind_1 to H5. decompose - | lapply linear lift_inv_flat_1 to H5. decompose - ]; destruct; autobatch. -qed. - -theorem lift_inj: \forall l,i,t1,t. Lift l i t1 t \to - \forall t2. Lift l i t2 t \to - t2 = t1. - intros 5. elim H; clear H i t1 t; - [ lapply linear lift_inv_sort_2 to H1 - | lapply linear lift_inv_lref_2_gt to H2, H1 - | lapply nle_nplus to H2 as H. - lapply linear nle_trans to H1, H as H0. - lapply lift_inv_lref_2_le_nplus to H3, H0, H2 - | lapply linear lift_inv_bind_2 to H5. decompose - | lapply linear lift_inv_flat_2 to H5. decompose - ]; destruct; autobatch. -qed. diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/inv.ma b/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/inv.ma deleted file mode 100644 index 152ec11d6..000000000 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/inv.ma +++ /dev/null @@ -1,147 +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 *) -(* *) -(**************************************************************************) - -include "Unified-Sub/Lift/defs.ma". - -(* Inversion properties *****************************************************) - -theorem lift_inv_sort_1: \forall l, i, h, x. - Lift l i (sort h) x \to - x = sort h. - intros. inversion H; clear H; intros; destruct. autobatch. -qed. - -theorem lift_inv_lref_1: \forall l, i, j1, x. - Lift l i (lref j1) x \to - (i > j1 \land x = lref j1) \lor - (i <= j1 \land - \exists j2. (l + j1 == j2) \land x = lref j2 - ). - intros. inversion H; clear H; intros; destruct; autobatch depth = 5 size = 7. -qed. - -theorem lift_inv_bind_1: \forall l, i, r, u1, t1, x. - Lift l i (intb r u1 t1) x \to - \exists u2, t2. - Lift l i u1 u2 \land - Lift l (succ i) t1 t2 \land - x = intb r u2 t2. - intros. inversion H; clear H; intros; destruct; autobatch depth = 5 size = 7. -qed. - -theorem lift_inv_flat_1: \forall l, i, r, u1, t1, x. - Lift l i (intf r u1 t1) x \to - \exists u2, t2. - Lift l i u1 u2 \land - Lift l i t1 t2 \land - x = intf r u2 t2. - intros. inversion H; clear H; intros; destruct. autobatch depth = 5 size = 7. -qed. - -theorem lift_inv_sort_2: \forall l, i, x, h. - Lift l i x (sort h) \to - x = sort h. - intros. inversion H; clear H; intros; destruct. autobatch. -qed. - -theorem lift_inv_lref_2: \forall l, i, x, j2. - Lift l i x (lref j2) \to - (i > j2 \land x = lref j2) \lor - (i <= j2 \land - \exists j1. (l + j1 == j2) \land x = lref j1 - ). - intros. inversion H; clear H; intros; destruct; autobatch depth = 5 size = 10. -qed. - -theorem lift_inv_bind_2: \forall l, i, r, x, u2, t2. - Lift l i x (intb r u2 t2) \to - \exists u1, t1. - Lift l i u1 u2 \land - Lift l (succ i) t1 t2 \land - x = intb r u1 t1. - intros. inversion H; clear H; intros; destruct. autobatch depth = 5 size = 7. -qed. - -theorem lift_inv_flat_2: \forall l, i, r, x, u2, t2. - Lift l i x (intf r u2 t2) \to - \exists u1, t1. - Lift l i u1 u2 \land - Lift l i t1 t2 \land - x = intf r u1 t1. - intros. inversion H; clear H; intros; destruct. autobatch depth = 5 size = 7. -qed. - -(* Corollaries of inversion properties ***************************************) - -theorem lift_inv_lref_1_gt: \forall l, i, j1, x. - Lift l i (lref j1) x \to - i > j1 \to x = lref j1. - intros. - lapply linear lift_inv_lref_1 to H. decompose; destruct; - [ autobatch - | lapply linear nle_false to H2, H1. decompose - ]. -qed. - -theorem lift_inv_lref_1_le: \forall l, i, j1, x. - Lift l i (lref j1) x \to i <= j1 \to - \exists j2. (l + j1 == j2) \land x = lref j2. - intros. - lapply linear lift_inv_lref_1 to H. decompose; destruct; - [ lapply linear nle_false to H1, H2. decompose - | autobatch - ]. -qed. - -theorem lift_inv_lref_1_le_nplus: \forall l, i, j1, x. - Lift l i (lref j1) x \to - i <= j1 \to \forall j2. (l + j1 == j2) \to - x = lref j2. - intros. - lapply linear lift_inv_lref_1 to H. decompose; destruct; - [ lapply linear nle_false to H1, H3. decompose - | lapply linear nplus_mono to H2, H4. destruct. autobatch - ]. -qed. - -theorem lift_inv_lref_2_gt: \forall l, i, x, j2. - Lift l i x (lref j2) \to - i > j2 \to x = lref j2. - intros. - lapply linear lift_inv_lref_2 to H. decompose; destruct; - [ autobatch - | lapply linear nle_false to H2, H1. decompose - ]. - qed. - -theorem lift_inv_lref_2_le: \forall l, i, x, j2. - Lift l i x (lref j2) \to i <= j2 \to - \exists j1. (l + j1 == j2) \land x = lref j1. - intros. - lapply linear lift_inv_lref_2 to H. decompose; destruct; - [ lapply linear nle_false to H1, H2. decompose - | autobatch - ]. -qed. - -theorem lift_inv_lref_2_le_nplus: \forall l, i, x, j2. - Lift l i x (lref j2) \to - i <= j2 \to \forall j1. (l + j1 == j2) \to - x = lref j1. - intros. - lapply linear lift_inv_lref_2 to H. decompose; destruct; - [ lapply linear nle_false to H1, H3. decompose - | lapply linear nplus_inj_2 to H2, H4. destruct. autobatch - ]. -qed. diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/props.ma b/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/props.ma deleted file mode 100644 index 3090e09e6..000000000 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/props.ma +++ /dev/null @@ -1,81 +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 *) -(* *) -(**************************************************************************) - -include "Unified-Sub/Lift/fun.ma". - -(* NOTE: this holds because of nplus_comm_1 *) -theorem lift_comp: \forall l1,i1,t1,t2. Lift l1 i1 t1 t2 \to - \forall l2,i2,u1. Lift l2 i2 t1 u1 \to - \forall x. Lift l2 i2 t2 x \to - \forall i,y. Lift l1 i u1 y \to - i1 >= i2 \to (l2 + i1 == i) \to x = y. - intros 5. elim H; clear H i1 t1 t2; - [ lapply lift_mono to H1, H2. clear H2. destruct. - lapply linear lift_inv_sort_1 to H1. destruct. - lapply linear lift_inv_sort_1 to H3. destruct. autobatch - | lapply lift_mono to H2, H3. clear H3. destruct. - lapply linear lift_inv_lref_1 to H2. - decompose; destruct; clear H2 H5; - lapply linear lift_inv_lref_1_gt to H4; destruct; autobatch width = 4 - | lapply lift_inv_lref_1_le to H3; [ 2: autobatch ]. clear H3. - lapply lift_inv_lref_1_le to H4; [ 2: autobatch ]. clear H4. - decompose. destruct. clear H6 i2. - lapply lift_inv_lref_1_le to H5; [ 2: autobatch depth = 4 width = 4 ]. - decompose. destruct. clear H5 H1 H7 i. autobatch depth = 4 size = 7 - | clear H1 H3. - lapply linear lift_inv_bind_1 to H5. - lapply linear lift_inv_bind_1 to H6. decompose. destruct. - lapply linear lift_inv_bind_1 to H7. decompose. destruct. - autobatch depth = 4 width = 6 size = 15 - | clear H1 H3. - lapply linear lift_inv_flat_1 to H5. - lapply linear lift_inv_flat_1 to H6. decompose. destruct. - lapply linear lift_inv_flat_1 to H7. decompose. destruct. - autobatch depth = 4 width = 6 size = 9 - ]. -qed. - -theorem lift_comp_rew_dx: \forall l1,i1,t1,t2. Lift l1 i1 t1 t2 \to - \forall l2,i2,u1. Lift l2 i2 t1 u1 \to - \forall u2. Lift l2 i2 t2 u2 \to - i1 >= i2 \to \forall i. (l2 + i1 == i) \to - Lift l1 i u1 u2. - intros. - lapply (lift_total l1 u1 i). decompose. - lapply lift_comp to H, H1, H2, H5, H3, H4. destruct. autobatch. -qed. - -theorem lift_comp_rew_sx: \forall l1,i1,t1,t2. Lift l1 i1 t1 t2 \to - \forall l2,i2,u1. Lift l2 i2 t1 u1 \to - \forall i,u2. Lift l2 i t2 u2 \to - i2 >= i1 \to (l1 + i2 == i) \to - Lift l1 i1 u1 u2. - intros. - lapply (lift_total l1 u1 i1). decompose. - lapply lift_comp to H1, H, H5, H2, H3, H4. destruct. autobatch. -qed. -(* -theorem lift_trans_le: \forall l1,i1,t1,t2. Lift l1 i1 t1 t2 \to - \forall l2,i2,z. Lift l2 i2 t2 t3 \to - i1 <= i2 \to - \forall i. \to i2 <= i \to (l1 + i1 == i) \to - \forall l. (l1 + l2 == l) \to Lift l i1 t1 t3. - -axiom lift_conf_back_ge: \forall l1,i1,u1,u2. Lift l1 i1 u1 u2 \to - \forall l2,i,t2. Lift l2 i t2 u2 \to - \forall i2. i2 >= i1 \to (l1 + i2 == i) \to - \exists t1. | Lift l2 i2 t1 u1 \land - Lift l1 i1 t1 t2. - -*) diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/datatypes/Context.ma b/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/datatypes/Context.ma deleted file mode 100644 index 03d9d7610..000000000 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/datatypes/Context.ma +++ /dev/null @@ -1,25 +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 *) -(* *) -(**************************************************************************) - -(* FLAT CONTEXTS - - Naming policy: - - contexts: c d -*) - -include "Unified-Sub/datatypes/Term.ma". - -inductive Context: Type \def - | leaf: Context - | intb: Context \to IntB \to Term \to Context -. diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/datatypes/Term.ma b/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/datatypes/Term.ma deleted file mode 100644 index d1a98de5a..000000000 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Unified-Sub/datatypes/Term.ma +++ /dev/null @@ -1,51 +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 *) -(* *) -(**************************************************************************) - -(* POLARIZED TERMS - - Naming policy: - - natural numbers : sorts h k, local references i j, lengths l o - - boolean values : p q - - generic binding items: r s - - generic flat items : r s - - generic head items : m n - - terms : t u -*) - -include "Unified-Sub/preamble.ma". - -inductive Bind: Type \def - | abbr: Bind - | abst: Bind - | excl: Bind -. - -inductive Flat: Type \def - | appl: Flat - | cast: Flat -. - -inductive IntB: Type \def - | bind: Bool \to Bind \to IntB -. - -inductive IntF: Type \def - | flat: Bool \to Flat \to IntF -. - -inductive Term: Type \def - | sort: Nat \to Term - | lref: Nat \to Term - | intb: IntB \to Term \to Term \to Term - | intf: IntF \to Term \to Term \to Term -. diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/root b/helm/software/matita/contribs/LAMBDA-TYPES/root index 092311539..6819b272f 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/root +++ b/helm/software/matita/contribs/LAMBDA-TYPES/root @@ -1,2 +1,2 @@ baseuri=cic:/matita/LAMBDA-TYPES -include_paths= ../../legacy ../RELATIONAL +include_paths= ../../legacy -- 2.39.2