From 20377cd037f6cc5eb9c6a5664354a8a0189d3f4f Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Tue, 4 Mar 2008 19:10:48 +0000 Subject: [PATCH] components/library: dotdothack removed legacy & LAMBDA-TYPES support $(MATITAUSEROPTIONS) (= -system for fguidi) LAMBDA-TYPES: two missing generation lemmas added --- helm/software/components/library/librarian.ml | 3 +- .../software/components/library/librarian.mli | 1 - .../LAMBDA-TYPES/LambdaDelta-1/aprem/props.ma | 127 +-- .../LAMBDA-TYPES/LambdaDelta-1/arity/aprem.ma | 2 - .../LAMBDA-TYPES/LambdaDelta-1/arity/fwd.ma | 15 +- .../LAMBDA-TYPES/LambdaDelta-1/ex2/props.ma | 34 +- .../LAMBDA-TYPES/LambdaDelta-1/leq/asucc.ma | 864 ++++++------------ .../LAMBDA-TYPES/LambdaDelta-1/leq/fwd.ma | 294 ++++-- .../LAMBDA-TYPES/LambdaDelta-1/leq/props.ma | 411 +++------ .../LAMBDA-TYPES/LambdaDelta-1/nf2/arity.ma | 87 +- .../LAMBDA-TYPES/LambdaDelta-1/sc3/props.ma | 58 +- .../LAMBDA-TYPES/LambdaDelta-1/ty3/arity.ma | 168 ++-- .../matita/contribs/LAMBDA-TYPES/Makefile | 2 +- helm/software/matita/legacy/Makefile | 2 +- helm/software/matita/matitacLib.ml | 15 +- 15 files changed, 807 insertions(+), 1276 deletions(-) diff --git a/helm/software/components/library/librarian.ml b/helm/software/components/library/librarian.ml index f9831545d..919edb36c 100644 --- a/helm/software/components/library/librarian.ml +++ b/helm/software/components/library/librarian.ml @@ -153,7 +153,6 @@ module type Format = val mtime_of_source_object: source_object -> float option val mtime_of_target_object: target_object -> float option val is_readonly_buri_of: options -> source_object -> bool - val dotdothack: source_object -> source_object end module Make = functor (F:Format) -> struct @@ -357,7 +356,7 @@ module Make = functor (F:Format) -> struct make_aux root opts [] [] deps else make_aux root opts [] [] - (purge_unwanted_roots (List.map F.dotdothack targets) deps) + (purge_unwanted_roots targets deps) in HLog.debug ("Leaving directory '"^root^"'"); Sys.chdir old_root; diff --git a/helm/software/components/library/librarian.mli b/helm/software/components/library/librarian.mli index 25ab0853e..0c74f3ea5 100644 --- a/helm/software/components/library/librarian.mli +++ b/helm/software/components/library/librarian.mli @@ -74,7 +74,6 @@ module type Format = val mtime_of_source_object: source_object -> float option val mtime_of_target_object: target_object -> float option val is_readonly_buri_of: options -> source_object -> bool - val dotdothack: source_object -> source_object end module Make : diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/aprem/props.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/aprem/props.ma index 0a0a9525e..895bc5176 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/aprem/props.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/aprem/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "LambdaDelta-1/aprem/defs.ma". +include "LambdaDelta-1/aprem/fwd.ma". include "LambdaDelta-1/leq/defs.ma". @@ -29,111 +29,32 @@ a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(\forall (i: nat).(\forall (b1: A).(aprem i a b1)))))))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (_: (eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))).(\lambda (i: nat).(\lambda (b2: -A).(\lambda (H1: (aprem i (ASort h2 n2) b2)).(let H2 \def (match H1 in aprem -return (\lambda (n: nat).(\lambda (a: A).(\lambda (a0: A).(\lambda (_: (aprem -n a a0)).((eq nat n i) \to ((eq A a (ASort h2 n2)) \to ((eq A a0 b2) \to (ex2 -A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i (ASort h1 n1) -b1)))))))))) with [(aprem_zero a0 a3) \Rightarrow (\lambda (H2: (eq nat O -i)).(\lambda (H3: (eq A (AHead a0 a3) (ASort h2 n2))).(\lambda (H4: (eq A a0 -b2)).(eq_ind nat O (\lambda (n: nat).((eq A (AHead a0 a3) (ASort h2 n2)) \to -((eq A a0 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: -A).(aprem n (ASort h1 n1) b1)))))) (\lambda (H5: (eq A (AHead a0 a3) (ASort -h2 n2))).(let H6 \def (eq_ind A (AHead a0 a3) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ -_) \Rightarrow True])) I (ASort h2 n2) H5) in (False_ind ((eq A a0 b2) \to -(ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (ASort h1 -n1) b1)))) H6))) i H2 H3 H4)))) | (aprem_succ a0 a i0 H2 a3) \Rightarrow -(\lambda (H3: (eq nat (S i0) i)).(\lambda (H4: (eq A (AHead a3 a0) (ASort h2 -n2))).(\lambda (H5: (eq A a b2)).(eq_ind nat (S i0) (\lambda (n: nat).((eq A -(AHead a3 a0) (ASort h2 n2)) \to ((eq A a b2) \to ((aprem i0 a0 a) \to (ex2 A -(\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n (ASort h1 n1) -b1))))))) (\lambda (H6: (eq A (AHead a3 a0) (ASort h2 n2))).(let H7 \def -(eq_ind A (AHead a3 a0) (\lambda (e: A).(match e in A return (\lambda (_: -A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow -True])) I (ASort h2 n2) H6) in (False_ind ((eq A a b2) \to ((aprem i0 a0 a) -\to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) -(ASort h1 n1) b1))))) H7))) i H3 H4 H5 H2))))]) in (H2 (refl_equal nat i) -(refl_equal A (ASort h2 n2)) (refl_equal A b2)))))))))))) (\lambda (a0: -A).(\lambda (a3: A).(\lambda (H0: (leq g a0 a3)).(\lambda (_: ((\forall (i: -nat).(\forall (b2: A).((aprem i a3 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 -b2)) (\lambda (b1: A).(aprem i a0 b1)))))))).(\lambda (a4: A).(\lambda (a5: -A).(\lambda (_: (leq g a4 a5)).(\lambda (H3: ((\forall (i: nat).(\forall (b2: -A).((aprem i a5 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: -A).(aprem i a4 b1)))))))).(\lambda (i: nat).(\lambda (b2: A).(\lambda (H4: -(aprem i (AHead a3 a5) b2)).(nat_ind (\lambda (n: nat).((aprem n (AHead a3 -a5) b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n -(AHead a0 a4) b1))))) (\lambda (H5: (aprem O (AHead a3 a5) b2)).(let H6 \def -(match H5 in aprem return (\lambda (n: nat).(\lambda (a: A).(\lambda (a6: -A).(\lambda (_: (aprem n a a6)).((eq nat n O) \to ((eq A a (AHead a3 a5)) \to -((eq A a6 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: -A).(aprem O (AHead a0 a4) b1)))))))))) with [(aprem_zero a6 a7) \Rightarrow -(\lambda (_: (eq nat O O)).(\lambda (H7: (eq A (AHead a6 a7) (AHead a3 -a5))).(\lambda (H8: (eq A a6 b2)).((let H9 \def (f_equal A A (\lambda (e: -A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a7 | -(AHead _ a) \Rightarrow a])) (AHead a6 a7) (AHead a3 a5) H7) in ((let H10 -\def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) -with [(ASort _ _) \Rightarrow a6 | (AHead a _) \Rightarrow a])) (AHead a6 a7) -(AHead a3 a5) H7) in (eq_ind A a3 (\lambda (a: A).((eq A a7 a5) \to ((eq A a -b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O -(AHead a0 a4) b1)))))) (\lambda (H11: (eq A a7 a5)).(eq_ind A a5 (\lambda (_: -A).((eq A a3 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: -A).(aprem O (AHead a0 a4) b1))))) (\lambda (H12: (eq A a3 b2)).(eq_ind A b2 -(\lambda (_: A).(ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: -A).(aprem O (AHead a0 a4) b1)))) (eq_ind A a3 (\lambda (a: A).(ex2 A (\lambda -(b1: A).(leq g b1 a)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))) +A).(\lambda (H1: (aprem i (ASort h2 n2) b2)).(let H_x \def (aprem_gen_sort b2 +i h2 n2 H1) in (let H2 \def H_x in (False_ind (ex2 A (\lambda (b1: A).(leq g +b1 b2)) (\lambda (b1: A).(aprem i (ASort h1 n1) b1))) H2)))))))))))) (\lambda +(a0: A).(\lambda (a3: A).(\lambda (H0: (leq g a0 a3)).(\lambda (_: ((\forall +(i: nat).(\forall (b2: A).((aprem i a3 b2) \to (ex2 A (\lambda (b1: A).(leq g +b1 b2)) (\lambda (b1: A).(aprem i a0 b1)))))))).(\lambda (a4: A).(\lambda +(a5: A).(\lambda (_: (leq g a4 a5)).(\lambda (H3: ((\forall (i: nat).(\forall +(b2: A).((aprem i a5 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda +(b1: A).(aprem i a4 b1)))))))).(\lambda (i: nat).(\lambda (b2: A).(\lambda +(H4: (aprem i (AHead a3 a5) b2)).(nat_ind (\lambda (n: nat).((aprem n (AHead +a3 a5) b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem +n (AHead a0 a4) b1))))) (\lambda (H5: (aprem O (AHead a3 a5) b2)).(let H_y +\def (aprem_gen_head_O a3 a5 b2 H5) in (eq_ind_r A a3 (\lambda (a: A).(ex2 A +(\lambda (b1: A).(leq g b1 a)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))) (ex_intro2 A (\lambda (b1: A).(leq g b1 a3)) (\lambda (b1: A).(aprem O (AHead -a0 a4) b1)) a0 H0 (aprem_zero a0 a4)) b2 H12) a3 (sym_eq A a3 b2 H12))) a7 -(sym_eq A a7 a5 H11))) a6 (sym_eq A a6 a3 H10))) H9)) H8)))) | (aprem_succ a6 -a i0 H6 a7) \Rightarrow (\lambda (H7: (eq nat (S i0) O)).(\lambda (H8: (eq A -(AHead a7 a6) (AHead a3 a5))).(\lambda (H9: (eq A a b2)).((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 a7 a6) (AHead a3 a5)) \to ((eq A a b2) \to ((aprem -i0 a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O -(AHead a0 a4) b1)))))) H10)) H8 H9 H6))))]) in (H6 (refl_equal nat O) -(refl_equal A (AHead a3 a5)) (refl_equal A b2)))) (\lambda (i0: nat).(\lambda +a0 a4) b1)) a0 H0 (aprem_zero a0 a4)) b2 H_y))) (\lambda (i0: nat).(\lambda (_: (((aprem i0 (AHead a3 a5) b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i0 (AHead a0 a4) b1)))))).(\lambda (H5: (aprem (S i0) -(AHead a3 a5) b2)).(let H6 \def (match H5 in aprem return (\lambda (n: -nat).(\lambda (a: A).(\lambda (a6: A).(\lambda (_: (aprem n a a6)).((eq nat n -(S i0)) \to ((eq A a (AHead a3 a5)) \to ((eq A a6 b2) \to (ex2 A (\lambda -(b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) (AHead a0 a4) -b1)))))))))) with [(aprem_zero a6 a7) \Rightarrow (\lambda (H6: (eq nat O (S -i0))).(\lambda (H7: (eq A (AHead a6 a7) (AHead a3 a5))).(\lambda (H8: (eq A -a6 b2)).((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 a6 a7) (AHead a3 a5)) \to ((eq A a6 -b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) -(AHead a0 a4) b1))))) H9)) H7 H8)))) | (aprem_succ a6 a i1 H6 a7) \Rightarrow -(\lambda (H7: (eq nat (S i1) (S i0))).(\lambda (H8: (eq A (AHead a7 a6) -(AHead a3 a5))).(\lambda (H9: (eq A a b2)).((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 a7 a6) (AHead a3 a5)) \to ((eq A a b2) \to -((aprem n a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: -A).(aprem (S i0) (AHead a0 a4) b1))))))) (\lambda (H11: (eq A (AHead a7 a6) -(AHead a3 a5))).(let H12 \def (f_equal A A (\lambda (e: A).(match e in A -return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a6 | (AHead _ a8) -\Rightarrow a8])) (AHead a7 a6) (AHead a3 a5) H11) in ((let H13 \def (f_equal -A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a7 | (AHead a8 _) \Rightarrow a8])) (AHead a7 a6) (AHead a3 a5) -H11) in (eq_ind A a3 (\lambda (_: A).((eq A a6 a5) \to ((eq A a b2) \to -((aprem i0 a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: -A).(aprem (S i0) (AHead a0 a4) b1))))))) (\lambda (H14: (eq A a6 a5)).(eq_ind -A a5 (\lambda (a8: A).((eq A a b2) \to ((aprem i0 a8 a) \to (ex2 A (\lambda -(b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) (AHead a0 a4) b1)))))) -(\lambda (H15: (eq A a b2)).(eq_ind A b2 (\lambda (a8: A).((aprem i0 a5 a8) -\to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) -(AHead a0 a4) b1))))) (\lambda (H16: (aprem i0 a5 b2)).(let H_x \def (H3 i0 -b2 H16) in (let H17 \def H_x in (ex2_ind A (\lambda (b1: A).(leq g b1 b2)) -(\lambda (b1: A).(aprem i0 a4 b1)) (ex2 A (\lambda (b1: A).(leq g b1 b2)) -(\lambda (b1: A).(aprem (S i0) (AHead a0 a4) b1))) (\lambda (x: A).(\lambda -(H18: (leq g x b2)).(\lambda (H19: (aprem i0 a4 x)).(ex_intro2 A (\lambda -(b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) (AHead a0 a4) b1)) x -H18 (aprem_succ a4 x i0 H19 a0))))) H17)))) a (sym_eq A a b2 H15))) a6 -(sym_eq A a6 a5 H14))) a7 (sym_eq A a7 a3 H13))) H12))) i1 (sym_eq nat i1 i0 -H10))) H8 H9 H6))))]) in (H6 (refl_equal nat (S i0)) (refl_equal A (AHead a3 -a5)) (refl_equal A b2)))))) i H4)))))))))))) a1 a2 H)))). +(AHead a3 a5) b2)).(let H_y \def (aprem_gen_head_S a3 a5 b2 i0 H5) in (let +H_x \def (H3 i0 b2 H_y) in (let H6 \def H_x in (ex2_ind A (\lambda (b1: +A).(leq g b1 b2)) (\lambda (b1: A).(aprem i0 a4 b1)) (ex2 A (\lambda (b1: +A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) (AHead a0 a4) b1))) (\lambda +(x: A).(\lambda (H7: (leq g x b2)).(\lambda (H8: (aprem i0 a4 x)).(ex_intro2 +A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) (AHead a0 +a4) b1)) x H7 (aprem_succ a4 x i0 H8 a0))))) H6))))))) i H4)))))))))))) a1 a2 +H)))). theorem aprem_asucc: \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (i: nat).((aprem i 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 bfcc4fab3..5045207ec 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,8 +20,6 @@ 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 diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/fwd.ma index b0ca1a3b1..cba7ad939 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/fwd.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/fwd.ma @@ -663,15 +663,16 @@ A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (asucc g x0))).(\lambda (H11: (arity g (CHead c0 (Bind Abst) u) t x1)).(let H12 \def (eq_ind A a1 (\lambda (a0: A).(leq g a0 a2)) H3 (AHead x0 x1) H9) in (let H13 \def (eq_ind A a1 (\lambda (a0: A).(arity g c0 (THead (Bind Abst) u -t) a0)) H7 (AHead x0 x1) H9) in (let H_x \def (leq_gen_head g x0 x1 a2 H12) -in (let H14 \def H_x in (ex3_2_ind A A (\lambda (a3: A).(\lambda (a4: A).(eq -A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(leq g x0 a3))) -(\lambda (_: A).(\lambda (a4: A).(leq g x1 a4))) (ex3_2 A A (\lambda (a3: +t) a0)) H7 (AHead x0 x1) H9) in (let H_x \def (leq_gen_head1 g x0 x1 a2 H12) +in (let H14 \def H_x in (ex3_2_ind A A (\lambda (a3: A).(\lambda (_: A).(leq +g x0 a3))) (\lambda (_: A).(\lambda (a4: A).(leq g x1 a4))) (\lambda (a3: +A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4)))) (\lambda (x2: A).(\lambda (x3: A).(\lambda -(H15: (eq A a2 (AHead x2 x3))).(\lambda (H16: (leq g x0 x2)).(\lambda (H17: -(leq g x1 x3)).(eq_ind_r A (AHead x2 x3) (\lambda (a0: A).(ex3_2 A A (\lambda +(H15: (leq g x0 x2)).(\lambda (H16: (leq g x1 x3)).(\lambda (H17: (eq A a2 +(AHead x2 x3))).(let H18 \def (f_equal A A (\lambda (e: A).e) a2 (AHead x2 +x3) H17) in (eq_ind_r A (AHead x2 x3) (\lambda (a0: A).(ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a0 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4))))) (ex3_2_intro A A (\lambda (a3: @@ -679,7 +680,7 @@ A).(\lambda (a4: A).(eq A (AHead x2 x3) (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4))) x2 x3 (refl_equal A (AHead x2 x3)) (arity_repl g c0 u (asucc g x0) H10 (asucc g x2) (asucc_repl g x0 x2 -H16)) (arity_repl g (CHead c0 (Bind Abst) u) t x1 H11 x3 H17)) a2 H15)))))) +H15)) (arity_repl g (CHead c0 (Bind Abst) u) t x1 H11 x3 H16)) a2 H18))))))) H14)))))))))) H8))))))))))))) c y a H0))) H)))))). theorem arity_gen_appl: diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ex2/props.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ex2/props.ma index 4372ace2d..b596f85a2 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ex2/props.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ex2/props.ma @@ -141,29 +141,13 @@ Appl) (TSort O) (TSort O)) a)).(\lambda (P: Prop).(let H0 \def (a1: A).(arity g (CSort O) (TSort O) a1)) (\lambda (a1: A).(arity g (CSort O) (TSort O) (AHead a1 a))) P (\lambda (x: A).(\lambda (_: (arity g (CSort O) (TSort O) x)).(\lambda (H2: (arity g (CSort O) (TSort O) (AHead x a))).(let -H3 \def (match (arity_gen_sort g (CSort O) O (AHead x a) H2) in leq return -(\lambda (a0: A).(\lambda (a1: A).(\lambda (_: (leq ? a0 a1)).((eq A a0 -(AHead x a)) \to ((eq A a1 (ASort O O)) \to P))))) with [(leq_sort h1 h2 n1 -n2 k H3) \Rightarrow (\lambda (H4: (eq A (ASort h1 n1) (AHead x a))).(\lambda -(H5: (eq A (ASort h2 n2) (ASort O O))).((let H6 \def (eq_ind A (ASort h1 n1) -(\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) -\Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead x a) H4) in -(False_ind ((eq A (ASort h2 n2) (ASort O O)) \to ((eq A (aplus g (ASort h1 -n1) k) (aplus g (ASort h2 n2) k)) \to P)) H6)) H5 H3))) | (leq_head a1 a2 H3 -a3 a4 H4) \Rightarrow (\lambda (H5: (eq A (AHead a1 a3) (AHead x -a))).(\lambda (H6: (eq A (AHead a2 a4) (ASort O O))).((let H7 \def (f_equal A -A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a3 | (AHead _ a0) \Rightarrow a0])) (AHead a1 a3) (AHead x a) H5) -in ((let H8 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda -(_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a0 _) \Rightarrow a0])) -(AHead a1 a3) (AHead x a) H5) in (eq_ind A x (\lambda (a0: A).((eq A a3 a) -\to ((eq A (AHead a2 a4) (ASort O O)) \to ((leq g a0 a2) \to ((leq g a3 a4) -\to P))))) (\lambda (H9: (eq A a3 a)).(eq_ind A a (\lambda (a0: A).((eq A -(AHead a2 a4) (ASort O O)) \to ((leq g x a2) \to ((leq g a0 a4) \to P)))) -(\lambda (H10: (eq A (AHead a2 a4) (ASort O O))).(let H11 \def (eq_ind A -(AHead a2 a4) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with -[(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O -O) H10) in (False_ind ((leq g x a2) \to ((leq g a a4) \to P)) H11))) a3 -(sym_eq A a3 a H9))) a1 (sym_eq A a1 x H8))) H7)) H6 H3 H4)))]) in (H3 -(refl_equal A (AHead x a)) (refl_equal A (ASort O O))))))) H0))))). +H_x \def (leq_gen_head1 g x a (ASort O O) (arity_gen_sort g (CSort O) O +(AHead x a) H2)) in (let H3 \def H_x in (ex3_2_ind A A (\lambda (a3: +A).(\lambda (_: A).(leq g x a3))) (\lambda (_: A).(\lambda (a4: A).(leq g a +a4))) (\lambda (a3: A).(\lambda (a4: A).(eq A (ASort O O) (AHead a3 a4)))) P +(\lambda (x0: A).(\lambda (x1: A).(\lambda (_: (leq g x x0)).(\lambda (_: +(leq g a x1)).(\lambda (H6: (eq A (ASort O O) (AHead x0 x1))).(let H7 \def +(eq_ind A (ASort O O) (\lambda (ee: A).(match ee in A return (\lambda (_: +A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow +False])) I (AHead x0 x1) H6) in (False_ind P H7))))))) H3)))))) H0))))). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/asucc.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/asucc.ma index f3fe08b00..47a13f362 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/asucc.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/asucc.ma @@ -110,196 +110,118 @@ n3 n0)) (asucc g (ASort n1 n2))) \to (leq g (ASort n3 n0) (ASort n1 n2)))) (\lambda (H0: (leq g (asucc g (ASort O n0)) (asucc g (ASort n1 n2)))).(nat_ind (\lambda (n3: nat).((leq g (asucc g (ASort O n0)) (asucc g (ASort n3 n2))) \to (leq g (ASort O n0) (ASort n3 n2)))) (\lambda (H1: (leq g -(asucc g (ASort O n0)) (asucc g (ASort O n2)))).(let H2 \def (match H1 in leq -return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a -(ASort O (next g n0))) \to ((eq A a0 (ASort O (next g n2))) \to (leq g (ASort -O n0) (ASort O n2))))))) with [(leq_sort h1 h2 n3 n4 k H2) \Rightarrow -(\lambda (H3: (eq A (ASort h1 n3) (ASort O (next g n0)))).(\lambda (H4: (eq A -(ASort h2 n4) (ASort O (next g n2)))).((let H5 \def (f_equal A nat (\lambda -(e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n5) -\Rightarrow n5 | (AHead _ _) \Rightarrow n3])) (ASort h1 n3) (ASort O (next g -n0)) H3) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e in A return -(\lambda (_: A).nat) with [(ASort n5 _) \Rightarrow n5 | (AHead _ _) -\Rightarrow h1])) (ASort h1 n3) (ASort O (next g n0)) H3) in (eq_ind nat O -(\lambda (n5: nat).((eq nat n3 (next g n0)) \to ((eq A (ASort h2 n4) (ASort O -(next g n2))) \to ((eq A (aplus g (ASort n5 n3) k) (aplus g (ASort h2 n4) k)) -\to (leq g (ASort O n0) (ASort O n2)))))) (\lambda (H7: (eq nat n3 (next g -n0))).(eq_ind nat (next g n0) (\lambda (n5: nat).((eq A (ASort h2 n4) (ASort -O (next g n2))) \to ((eq A (aplus g (ASort O n5) k) (aplus g (ASort h2 n4) -k)) \to (leq g (ASort O n0) (ASort O n2))))) (\lambda (H8: (eq A (ASort h2 -n4) (ASort O (next g n2)))).(let H9 \def (f_equal A nat (\lambda (e: -A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n5) \Rightarrow -n5 | (AHead _ _) \Rightarrow n4])) (ASort h2 n4) (ASort O (next g n2)) H8) in -((let H10 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda -(_: A).nat) with [(ASort n5 _) \Rightarrow n5 | (AHead _ _) \Rightarrow h2])) -(ASort h2 n4) (ASort O (next g n2)) H8) in (eq_ind nat O (\lambda (n5: -nat).((eq nat n4 (next g n2)) \to ((eq A (aplus g (ASort O (next g n0)) k) -(aplus g (ASort n5 n4) k)) \to (leq g (ASort O n0) (ASort O n2))))) (\lambda -(H11: (eq nat n4 (next g n2))).(eq_ind nat (next g n2) (\lambda (n5: -nat).((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort O n5) k)) \to -(leq g (ASort O n0) (ASort O n2)))) (\lambda (H12: (eq A (aplus g (ASort O -(next g n0)) k) (aplus g (ASort O (next g n2)) k))).(let H13 \def (eq_ind_r A -(aplus g (ASort O (next g n0)) k) (\lambda (a: A).(eq A a (aplus g (ASort O -(next g n2)) k))) H12 (aplus g (ASort O n0) (S k)) (aplus_sort_O_S_simpl g n0 -k)) in (let H14 \def (eq_ind_r A (aplus g (ASort O (next g n2)) k) (\lambda -(a: A).(eq A (aplus g (ASort O n0) (S k)) a)) H13 (aplus g (ASort O n2) (S -k)) (aplus_sort_O_S_simpl g n2 k)) in (leq_sort g O O n0 n2 (S k) H14)))) n4 -(sym_eq nat n4 (next g n2) H11))) h2 (sym_eq nat h2 O H10))) H9))) n3 (sym_eq -nat n3 (next g n0) H7))) h1 (sym_eq nat h1 O H6))) H5)) H4 H2))) | (leq_head -a0 a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A (AHead a0 a4) (ASort O -(next g n0)))).(\lambda (H5: (eq A (AHead a3 a5) (ASort O (next g -n2)))).((let H6 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ -_) \Rightarrow True])) I (ASort O (next g n0)) H4) in (False_ind ((eq A -(AHead a3 a5) (ASort O (next g n2))) \to ((leq g a0 a3) \to ((leq g a4 a5) -\to (leq g (ASort O n0) (ASort O n2))))) H6)) H5 H2 H3)))]) in (H2 -(refl_equal A (ASort O (next g n0))) (refl_equal A (ASort O (next g n2)))))) -(\lambda (n3: nat).(\lambda (_: (((leq g (asucc g (ASort O n0)) (asucc g -(ASort n3 n2))) \to (leq g (ASort O n0) (ASort n3 n2))))).(\lambda (H1: (leq -g (asucc g (ASort O n0)) (asucc g (ASort (S n3) n2)))).(let H2 \def (match H1 -in leq return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a -a0)).((eq A a (ASort O (next g n0))) \to ((eq A a0 (ASort n3 n2)) \to (leq g -(ASort O n0) (ASort (S n3) n2))))))) with [(leq_sort h1 h2 n4 n5 k H2) -\Rightarrow (\lambda (H3: (eq A (ASort h1 n4) (ASort O (next g -n0)))).(\lambda (H4: (eq A (ASort h2 n5) (ASort n3 n2))).((let H5 \def +(asucc g (ASort O n0)) (asucc g (ASort O n2)))).(let H_x \def (leq_gen_sort1 +g O (next g n0) (ASort O (next g n2)) H1) in (let H2 \def H_x in (ex2_3_ind +nat nat nat (\lambda (n3: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A +(aplus g (ASort O (next g n0)) k) (aplus g (ASort h2 n3) k))))) (\lambda (n3: +nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A (ASort O (next g n2)) (ASort +h2 n3))))) (leq g (ASort O n0) (ASort O n2)) (\lambda (x0: nat).(\lambda (x1: +nat).(\lambda (x2: nat).(\lambda (H3: (eq A (aplus g (ASort O (next g n0)) +x2) (aplus g (ASort x1 x0) x2))).(\lambda (H4: (eq A (ASort O (next g n2)) +(ASort x1 x0))).(let H5 \def (f_equal A nat (\lambda (e: A).(match e in A +return (\lambda (_: A).nat) with [(ASort n3 _) \Rightarrow n3 | (AHead _ _) +\Rightarrow O])) (ASort O (next g n2)) (ASort x1 x0) H4) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort _ n6) \Rightarrow n6 | (AHead _ _) \Rightarrow n4])) (ASort h1 n4) -(ASort O (next g n0)) H3) in ((let H6 \def (f_equal A nat (\lambda (e: -A).(match e in A return (\lambda (_: A).nat) with [(ASort n6 _) \Rightarrow -n6 | (AHead _ _) \Rightarrow h1])) (ASort h1 n4) (ASort O (next g n0)) H3) in -(eq_ind nat O (\lambda (n6: nat).((eq nat n4 (next g n0)) \to ((eq A (ASort -h2 n5) (ASort n3 n2)) \to ((eq A (aplus g (ASort n6 n4) k) (aplus g (ASort h2 -n5) k)) \to (leq g (ASort O n0) (ASort (S n3) n2)))))) (\lambda (H7: (eq nat -n4 (next g n0))).(eq_ind nat (next g n0) (\lambda (n6: nat).((eq A (ASort h2 -n5) (ASort n3 n2)) \to ((eq A (aplus g (ASort O n6) k) (aplus g (ASort h2 n5) -k)) \to (leq g (ASort O n0) (ASort (S n3) n2))))) (\lambda (H8: (eq A (ASort -h2 n5) (ASort n3 n2))).(let H9 \def (f_equal A nat (\lambda (e: A).(match e -in A return (\lambda (_: A).nat) with [(ASort _ n6) \Rightarrow n6 | (AHead _ -_) \Rightarrow n5])) (ASort h2 n5) (ASort n3 n2) H8) in ((let H10 \def -(f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort n6 _) \Rightarrow n6 | (AHead _ _) \Rightarrow h2])) (ASort h2 n5) -(ASort n3 n2) H8) in (eq_ind nat n3 (\lambda (n6: nat).((eq nat n5 n2) \to -((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n6 n5) k)) \to (leq -g (ASort O n0) (ASort (S n3) n2))))) (\lambda (H11: (eq nat n5 n2)).(eq_ind -nat n2 (\lambda (n6: nat).((eq A (aplus g (ASort O (next g n0)) k) (aplus g -(ASort n3 n6) k)) \to (leq g (ASort O n0) (ASort (S n3) n2)))) (\lambda (H12: -(eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n3 n2) k))).(let H13 -\def (eq_ind_r A (aplus g (ASort O (next g n0)) k) (\lambda (a: A).(eq A a -(aplus g (ASort n3 n2) k))) H12 (aplus g (ASort O n0) (S k)) -(aplus_sort_O_S_simpl g n0 k)) in (let H14 \def (eq_ind_r A (aplus g (ASort -n3 n2) k) (\lambda (a: A).(eq A (aplus g (ASort O n0) (S k)) a)) H13 (aplus g -(ASort (S n3) n2) (S k)) (aplus_sort_S_S_simpl g n2 n3 k)) in (leq_sort g O -(S n3) n0 n2 (S k) H14)))) n5 (sym_eq nat n5 n2 H11))) h2 (sym_eq nat h2 n3 -H10))) H9))) n4 (sym_eq nat n4 (next g n0) H7))) h1 (sym_eq nat h1 O H6))) -H5)) H4 H2))) | (leq_head a0 a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A -(AHead a0 a4) (ASort O (next g n0)))).(\lambda (H5: (eq A (AHead a3 a5) -(ASort n3 n2))).((let H6 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match -e in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | -(AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H4) in (False_ind -((eq A (AHead a3 a5) (ASort n3 n2)) \to ((leq g a0 a3) \to ((leq g a4 a5) \to -(leq g (ASort O n0) (ASort (S n3) n2))))) H6)) H5 H2 H3)))]) in (H2 -(refl_equal A (ASort O (next g n0))) (refl_equal A (ASort n3 n2))))))) n1 -H0)) (\lambda (n3: nat).(\lambda (IHn: (((leq g (asucc g (ASort n3 n0)) -(asucc g (ASort n1 n2))) \to (leq g (ASort n3 n0) (ASort n1 n2))))).(\lambda -(H0: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n1 n2)))).(nat_ind -(\lambda (n4: nat).((leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n4 -n2))) \to ((((leq g (asucc g (ASort n3 n0)) (asucc g (ASort n4 n2))) \to (leq -g (ASort n3 n0) (ASort n4 n2)))) \to (leq g (ASort (S n3) n0) (ASort n4 -n2))))) (\lambda (H1: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort O +[(ASort _ n3) \Rightarrow n3 | (AHead _ _) \Rightarrow ((match g with [(mk_G +next _) \Rightarrow next]) n2)])) (ASort O (next g n2)) (ASort x1 x0) H4) in +(\lambda (H7: (eq nat O x1)).(let H8 \def (eq_ind_r nat x1 (\lambda (n3: +nat).(eq A (aplus g (ASort O (next g n0)) x2) (aplus g (ASort n3 x0) x2))) H3 +O H7) in (let H9 \def (eq_ind_r nat x0 (\lambda (n3: nat).(eq A (aplus g +(ASort O (next g n0)) x2) (aplus g (ASort O n3) x2))) H8 (next g n2) H6) in +(let H10 \def (eq_ind_r A (aplus g (ASort O (next g n0)) x2) (\lambda (a: +A).(eq A a (aplus g (ASort O (next g n2)) x2))) H9 (aplus g (ASort O n0) (S +x2)) (aplus_sort_O_S_simpl g n0 x2)) in (let H11 \def (eq_ind_r A (aplus g +(ASort O (next g n2)) x2) (\lambda (a: A).(eq A (aplus g (ASort O n0) (S x2)) +a)) H10 (aplus g (ASort O n2) (S x2)) (aplus_sort_O_S_simpl g n2 x2)) in +(leq_sort g O O n0 n2 (S x2) H11))))))) H5))))))) H2)))) (\lambda (n3: +nat).(\lambda (_: (((leq g (asucc g (ASort O n0)) (asucc g (ASort n3 n2))) +\to (leq g (ASort O n0) (ASort n3 n2))))).(\lambda (H1: (leq g (asucc g +(ASort O n0)) (asucc g (ASort (S n3) n2)))).(let H_x \def (leq_gen_sort1 g O +(next g n0) (ASort n3 n2) H1) in (let H2 \def H_x in (ex2_3_ind nat nat nat +(\lambda (n4: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort +O (next g n0)) k) (aplus g (ASort h2 n4) k))))) (\lambda (n4: nat).(\lambda +(h2: nat).(\lambda (_: nat).(eq A (ASort n3 n2) (ASort h2 n4))))) (leq g +(ASort O n0) (ASort (S n3) n2)) (\lambda (x0: nat).(\lambda (x1: +nat).(\lambda (x2: nat).(\lambda (H3: (eq A (aplus g (ASort O (next g n0)) +x2) (aplus g (ASort x1 x0) x2))).(\lambda (H4: (eq A (ASort n3 n2) (ASort x1 +x0))).(let H5 \def (f_equal A nat (\lambda (e: A).(match e in A return +(\lambda (_: A).nat) with [(ASort n4 _) \Rightarrow n4 | (AHead _ _) +\Rightarrow n3])) (ASort n3 n2) (ASort x1 x0) H4) in ((let H6 \def (f_equal A +nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ +n4) \Rightarrow n4 | (AHead _ _) \Rightarrow n2])) (ASort n3 n2) (ASort x1 +x0) H4) in (\lambda (H7: (eq nat n3 x1)).(let H8 \def (eq_ind_r nat x1 +(\lambda (n4: nat).(eq A (aplus g (ASort O (next g n0)) x2) (aplus g (ASort +n4 x0) x2))) H3 n3 H7) in (let H9 \def (eq_ind_r nat x0 (\lambda (n4: +nat).(eq A (aplus g (ASort O (next g n0)) x2) (aplus g (ASort n3 n4) x2))) H8 +n2 H6) in (let H10 \def (eq_ind_r A (aplus g (ASort O (next g n0)) x2) +(\lambda (a: A).(eq A a (aplus g (ASort n3 n2) x2))) H9 (aplus g (ASort O n0) +(S x2)) (aplus_sort_O_S_simpl g n0 x2)) in (let H11 \def (eq_ind_r A (aplus g +(ASort n3 n2) x2) (\lambda (a: A).(eq A (aplus g (ASort O n0) (S x2)) a)) H10 +(aplus g (ASort (S n3) n2) (S x2)) (aplus_sort_S_S_simpl g n2 n3 x2)) in +(leq_sort g O (S n3) n0 n2 (S x2) H11))))))) H5))))))) H2)))))) n1 H0)) +(\lambda (n3: nat).(\lambda (IHn: (((leq g (asucc g (ASort n3 n0)) (asucc g +(ASort n1 n2))) \to (leq g (ASort n3 n0) (ASort n1 n2))))).(\lambda (H0: (leq +g (asucc g (ASort (S n3) n0)) (asucc g (ASort n1 n2)))).(nat_ind (\lambda +(n4: nat).((leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n4 n2))) \to +((((leq g (asucc g (ASort n3 n0)) (asucc g (ASort n4 n2))) \to (leq g (ASort +n3 n0) (ASort n4 n2)))) \to (leq g (ASort (S n3) n0) (ASort n4 n2))))) +(\lambda (H1: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort O n2)))).(\lambda (_: (((leq g (asucc g (ASort n3 n0)) (asucc g (ASort O n2))) -\to (leq g (ASort n3 n0) (ASort O n2))))).(let H2 \def (match H1 in leq -return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a -(ASort n3 n0)) \to ((eq A a0 (ASort O (next g n2))) \to (leq g (ASort (S n3) -n0) (ASort O n2))))))) with [(leq_sort h1 h2 n4 n5 k H2) \Rightarrow (\lambda -(H3: (eq A (ASort h1 n4) (ASort n3 n0))).(\lambda (H4: (eq A (ASort h2 n5) -(ASort O (next g n2)))).((let H5 \def (f_equal A nat (\lambda (e: A).(match e -in A return (\lambda (_: A).nat) with [(ASort _ n6) \Rightarrow n6 | (AHead _ -_) \Rightarrow n4])) (ASort h1 n4) (ASort n3 n0) H3) in ((let H6 \def +\to (leq g (ASort n3 n0) (ASort O n2))))).(let H_x \def (leq_gen_sort1 g n3 +n0 (ASort O (next g n2)) H1) in (let H2 \def H_x in (ex2_3_ind nat nat nat +(\lambda (n4: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort +n3 n0) k) (aplus g (ASort h2 n4) k))))) (\lambda (n4: nat).(\lambda (h2: +nat).(\lambda (_: nat).(eq A (ASort O (next g n2)) (ASort h2 n4))))) (leq g +(ASort (S n3) n0) (ASort O n2)) (\lambda (x0: nat).(\lambda (x1: +nat).(\lambda (x2: nat).(\lambda (H3: (eq A (aplus g (ASort n3 n0) x2) (aplus +g (ASort x1 x0) x2))).(\lambda (H4: (eq A (ASort O (next g n2)) (ASort x1 +x0))).(let H5 \def (f_equal A nat (\lambda (e: A).(match e in A return +(\lambda (_: A).nat) with [(ASort n4 _) \Rightarrow n4 | (AHead _ _) +\Rightarrow O])) (ASort O (next g n2)) (ASort x1 x0) H4) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort n6 _) \Rightarrow n6 | (AHead _ _) \Rightarrow h1])) (ASort h1 n4) -(ASort n3 n0) H3) in (eq_ind nat n3 (\lambda (n6: nat).((eq nat n4 n0) \to -((eq A (ASort h2 n5) (ASort O (next g n2))) \to ((eq A (aplus g (ASort n6 n4) -k) (aplus g (ASort h2 n5) k)) \to (leq g (ASort (S n3) n0) (ASort O n2)))))) -(\lambda (H7: (eq nat n4 n0)).(eq_ind nat n0 (\lambda (n6: nat).((eq A (ASort -h2 n5) (ASort O (next g n2))) \to ((eq A (aplus g (ASort n3 n6) k) (aplus g -(ASort h2 n5) k)) \to (leq g (ASort (S n3) n0) (ASort O n2))))) (\lambda (H8: -(eq A (ASort h2 n5) (ASort O (next g n2)))).(let H9 \def (f_equal A nat -(\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n6) -\Rightarrow n6 | (AHead _ _) \Rightarrow n5])) (ASort h2 n5) (ASort O (next g -n2)) H8) in ((let H10 \def (f_equal A nat (\lambda (e: A).(match e in A -return (\lambda (_: A).nat) with [(ASort n6 _) \Rightarrow n6 | (AHead _ _) -\Rightarrow h2])) (ASort h2 n5) (ASort O (next g n2)) H8) in (eq_ind nat O -(\lambda (n6: nat).((eq nat n5 (next g n2)) \to ((eq A (aplus g (ASort n3 n0) -k) (aplus g (ASort n6 n5) k)) \to (leq g (ASort (S n3) n0) (ASort O n2))))) -(\lambda (H11: (eq nat n5 (next g n2))).(eq_ind nat (next g n2) (\lambda (n6: -nat).((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort O n6) k)) \to (leq g -(ASort (S n3) n0) (ASort O n2)))) (\lambda (H12: (eq A (aplus g (ASort n3 n0) -k) (aplus g (ASort O (next g n2)) k))).(let H13 \def (eq_ind_r A (aplus g -(ASort n3 n0) k) (\lambda (a: A).(eq A a (aplus g (ASort O (next g n2)) k))) -H12 (aplus g (ASort (S n3) n0) (S k)) (aplus_sort_S_S_simpl g n0 n3 k)) in -(let H14 \def (eq_ind_r A (aplus g (ASort O (next g n2)) k) (\lambda (a: -A).(eq A (aplus g (ASort (S n3) n0) (S k)) a)) H13 (aplus g (ASort O n2) (S -k)) (aplus_sort_O_S_simpl g n2 k)) in (leq_sort g (S n3) O n0 n2 (S k) -H14)))) n5 (sym_eq nat n5 (next g n2) H11))) h2 (sym_eq nat h2 O H10))) H9))) -n4 (sym_eq nat n4 n0 H7))) h1 (sym_eq nat h1 n3 H6))) H5)) H4 H2))) | -(leq_head a0 a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A (AHead a0 a4) -(ASort n3 n0))).(\lambda (H5: (eq A (AHead a3 a5) (ASort O (next g -n2)))).((let H6 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ -_) \Rightarrow True])) I (ASort n3 n0) H4) in (False_ind ((eq A (AHead a3 a5) -(ASort O (next g n2))) \to ((leq g a0 a3) \to ((leq g a4 a5) \to (leq g -(ASort (S n3) n0) (ASort O n2))))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A -(ASort n3 n0)) (refl_equal A (ASort O (next g n2))))))) (\lambda (n4: +[(ASort _ n4) \Rightarrow n4 | (AHead _ _) \Rightarrow ((match g with [(mk_G +next _) \Rightarrow next]) n2)])) (ASort O (next g n2)) (ASort x1 x0) H4) in +(\lambda (H7: (eq nat O x1)).(let H8 \def (eq_ind_r nat x1 (\lambda (n4: +nat).(eq A (aplus g (ASort n3 n0) x2) (aplus g (ASort n4 x0) x2))) H3 O H7) +in (let H9 \def (eq_ind_r nat x0 (\lambda (n4: nat).(eq A (aplus g (ASort n3 +n0) x2) (aplus g (ASort O n4) x2))) H8 (next g n2) H6) in (let H10 \def +(eq_ind_r A (aplus g (ASort n3 n0) x2) (\lambda (a: A).(eq A a (aplus g +(ASort O (next g n2)) x2))) H9 (aplus g (ASort (S n3) n0) (S x2)) +(aplus_sort_S_S_simpl g n0 n3 x2)) in (let H11 \def (eq_ind_r A (aplus g +(ASort O (next g n2)) x2) (\lambda (a: A).(eq A (aplus g (ASort (S n3) n0) (S +x2)) a)) H10 (aplus g (ASort O n2) (S x2)) (aplus_sort_O_S_simpl g n2 x2)) in +(leq_sort g (S n3) O n0 n2 (S x2) H11))))))) H5))))))) H2))))) (\lambda (n4: nat).(\lambda (_: (((leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n4 n2))) \to ((((leq g (asucc g (ASort n3 n0)) (asucc g (ASort n4 n2))) \to (leq g (ASort n3 n0) (ASort n4 n2)))) \to (leq g (ASort (S n3) n0) (ASort n4 n2)))))).(\lambda (H1: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort (S n4) n2)))).(\lambda (_: (((leq g (asucc g (ASort n3 n0)) (asucc g (ASort (S -n4) n2))) \to (leq g (ASort n3 n0) (ASort (S n4) n2))))).(let H2 \def (match -H1 in leq return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a -a0)).((eq A a (ASort n3 n0)) \to ((eq A a0 (ASort n4 n2)) \to (leq g (ASort -(S n3) n0) (ASort (S n4) n2))))))) with [(leq_sort h1 h2 n5 n6 k H2) -\Rightarrow (\lambda (H3: (eq A (ASort h1 n5) (ASort n3 n0))).(\lambda (H4: -(eq A (ASort h2 n6) (ASort n4 n2))).((let H5 \def (f_equal A nat (\lambda (e: -A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n7) \Rightarrow -n7 | (AHead _ _) \Rightarrow n5])) (ASort h1 n5) (ASort n3 n0) H3) in ((let -H6 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: -A).nat) with [(ASort n7 _) \Rightarrow n7 | (AHead _ _) \Rightarrow h1])) -(ASort h1 n5) (ASort n3 n0) H3) in (eq_ind nat n3 (\lambda (n7: nat).((eq nat -n5 n0) \to ((eq A (ASort h2 n6) (ASort n4 n2)) \to ((eq A (aplus g (ASort n7 -n5) k) (aplus g (ASort h2 n6) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) -n2)))))) (\lambda (H7: (eq nat n5 n0)).(eq_ind nat n0 (\lambda (n7: nat).((eq -A (ASort h2 n6) (ASort n4 n2)) \to ((eq A (aplus g (ASort n3 n7) k) (aplus g -(ASort h2 n6) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) (\lambda -(H8: (eq A (ASort h2 n6) (ASort n4 n2))).(let H9 \def (f_equal A nat (\lambda -(e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n7) -\Rightarrow n7 | (AHead _ _) \Rightarrow n6])) (ASort h2 n6) (ASort n4 n2) -H8) in ((let H10 \def (f_equal A nat (\lambda (e: A).(match e in A return -(\lambda (_: A).nat) with [(ASort n7 _) \Rightarrow n7 | (AHead _ _) -\Rightarrow h2])) (ASort h2 n6) (ASort n4 n2) H8) in (eq_ind nat n4 (\lambda -(n7: nat).((eq nat n6 n2) \to ((eq A (aplus g (ASort n3 n0) k) (aplus g -(ASort n7 n6) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) (\lambda -(H11: (eq nat n6 n2)).(eq_ind nat n2 (\lambda (n7: nat).((eq A (aplus g -(ASort n3 n0) k) (aplus g (ASort n4 n7) k)) \to (leq g (ASort (S n3) n0) -(ASort (S n4) n2)))) (\lambda (H12: (eq A (aplus g (ASort n3 n0) k) (aplus g -(ASort n4 n2) k))).(let H13 \def (eq_ind_r A (aplus g (ASort n3 n0) k) -(\lambda (a: A).(eq A a (aplus g (ASort n4 n2) k))) H12 (aplus g (ASort (S -n3) n0) (S k)) (aplus_sort_S_S_simpl g n0 n3 k)) in (let H14 \def (eq_ind_r A -(aplus g (ASort n4 n2) k) (\lambda (a: A).(eq A (aplus g (ASort (S n3) n0) (S -k)) a)) H13 (aplus g (ASort (S n4) n2) (S k)) (aplus_sort_S_S_simpl g n2 n4 -k)) in (leq_sort g (S n3) (S n4) n0 n2 (S k) H14)))) n6 (sym_eq nat n6 n2 -H11))) h2 (sym_eq nat h2 n4 H10))) H9))) n5 (sym_eq nat n5 n0 H7))) h1 -(sym_eq nat h1 n3 H6))) H5)) H4 H2))) | (leq_head a0 a3 H2 a4 a5 H3) -\Rightarrow (\lambda (H4: (eq A (AHead a0 a4) (ASort n3 n0))).(\lambda (H5: -(eq A (AHead a3 a5) (ASort n4 n2))).((let H6 \def (eq_ind A (AHead a0 a4) -(\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) -\Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n3 n0) H4) in -(False_ind ((eq A (AHead a3 a5) (ASort n4 n2)) \to ((leq g a0 a3) \to ((leq g -a4 a5) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) H6)) H5 H2 H3)))]) -in (H2 (refl_equal A (ASort n3 n0)) (refl_equal A (ASort n4 n2)))))))) n1 H0 -IHn)))) n H)))) (\lambda (a: A).(\lambda (H: (((leq g (asucc g (ASort n n0)) -(asucc g a)) \to (leq g (ASort n n0) a)))).(\lambda (a0: A).(\lambda (H0: -(((leq g (asucc g (ASort n n0)) (asucc g a0)) \to (leq g (ASort n n0) +n4) n2))) \to (leq g (ASort n3 n0) (ASort (S n4) n2))))).(let H_x \def +(leq_gen_sort1 g n3 n0 (ASort n4 n2) H1) in (let H2 \def H_x in (ex2_3_ind +nat nat nat (\lambda (n5: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A +(aplus g (ASort n3 n0) k) (aplus g (ASort h2 n5) k))))) (\lambda (n5: +nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A (ASort n4 n2) (ASort h2 +n5))))) (leq g (ASort (S n3) n0) (ASort (S n4) n2)) (\lambda (x0: +nat).(\lambda (x1: nat).(\lambda (x2: nat).(\lambda (H3: (eq A (aplus g +(ASort n3 n0) x2) (aplus g (ASort x1 x0) x2))).(\lambda (H4: (eq A (ASort n4 +n2) (ASort x1 x0))).(let H5 \def (f_equal A nat (\lambda (e: A).(match e in A +return (\lambda (_: A).nat) with [(ASort n5 _) \Rightarrow n5 | (AHead _ _) +\Rightarrow n4])) (ASort n4 n2) (ASort x1 x0) H4) in ((let H6 \def (f_equal A +nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ +n5) \Rightarrow n5 | (AHead _ _) \Rightarrow n2])) (ASort n4 n2) (ASort x1 +x0) H4) in (\lambda (H7: (eq nat n4 x1)).(let H8 \def (eq_ind_r nat x1 +(\lambda (n5: nat).(eq A (aplus g (ASort n3 n0) x2) (aplus g (ASort n5 x0) +x2))) H3 n4 H7) in (let H9 \def (eq_ind_r nat x0 (\lambda (n5: nat).(eq A +(aplus g (ASort n3 n0) x2) (aplus g (ASort n4 n5) x2))) H8 n2 H6) in (let H10 +\def (eq_ind_r A (aplus g (ASort n3 n0) x2) (\lambda (a: A).(eq A a (aplus g +(ASort n4 n2) x2))) H9 (aplus g (ASort (S n3) n0) (S x2)) +(aplus_sort_S_S_simpl g n0 n3 x2)) in (let H11 \def (eq_ind_r A (aplus g +(ASort n4 n2) x2) (\lambda (a: A).(eq A (aplus g (ASort (S n3) n0) (S x2)) +a)) H10 (aplus g (ASort (S n4) n2) (S x2)) (aplus_sort_S_S_simpl g n2 n4 x2)) +in (leq_sort g (S n3) (S n4) n0 n2 (S x2) H11))))))) H5))))))) H2))))))) n1 +H0 IHn)))) n H)))) (\lambda (a: A).(\lambda (H: (((leq g (asucc g (ASort n +n0)) (asucc g a)) \to (leq g (ASort n n0) a)))).(\lambda (a0: A).(\lambda +(H0: (((leq g (asucc g (ASort n n0)) (asucc g a0)) \to (leq g (ASort n n0) a0)))).(\lambda (H1: (leq g (asucc g (ASort n n0)) (asucc g (AHead a a0)))).(nat_ind (\lambda (n1: nat).((((leq g (asucc g (ASort n1 n0)) (asucc g a)) \to (leq g (ASort n1 n0) a))) \to ((((leq g (asucc g (ASort n1 n0)) @@ -308,185 +230,91 @@ n0)) (asucc g (AHead a a0))) \to (leq g (ASort n1 n0) (AHead a a0)))))) (\lambda (_: (((leq g (asucc g (ASort O n0)) (asucc g a)) \to (leq g (ASort O n0) a)))).(\lambda (_: (((leq g (asucc g (ASort O n0)) (asucc g a0)) \to (leq g (ASort O n0) a0)))).(\lambda (H4: (leq g (asucc g (ASort O n0)) (asucc g -(AHead a a0)))).(let H5 \def (match H4 in leq return (\lambda (a3: -A).(\lambda (a4: A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (ASort O (next g -n0))) \to ((eq A a4 (AHead a (asucc g a0))) \to (leq g (ASort O n0) (AHead a -a0))))))) with [(leq_sort h1 h2 n1 n2 k H5) \Rightarrow (\lambda (H6: (eq A -(ASort h1 n1) (ASort O (next g n0)))).(\lambda (H7: (eq A (ASort h2 n2) -(AHead a (asucc g a0)))).((let H8 \def (f_equal A nat (\lambda (e: A).(match -e in A return (\lambda (_: A).nat) with [(ASort _ n3) \Rightarrow n3 | (AHead -_ _) \Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H6) in ((let H9 -\def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) -with [(ASort n3 _) \Rightarrow n3 | (AHead _ _) \Rightarrow h1])) (ASort h1 -n1) (ASort O (next g n0)) H6) in (eq_ind nat O (\lambda (n3: nat).((eq nat n1 -(next g n0)) \to ((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A -(aplus g (ASort n3 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort O n0) -(AHead a a0)))))) (\lambda (H10: (eq nat n1 (next g n0))).(eq_ind nat (next g -n0) (\lambda (n3: nat).((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq -A (aplus g (ASort O n3) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort O n0) -(AHead a a0))))) (\lambda (H11: (eq A (ASort h2 n2) (AHead a (asucc g -a0)))).(let H12 \def (eq_ind A (ASort h2 n2) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) -\Rightarrow False])) I (AHead a (asucc g a0)) H11) in (False_ind ((eq A -(aplus g (ASort O (next g n0)) k) (aplus g (ASort h2 n2) k)) \to (leq g -(ASort O n0) (AHead a a0))) H12))) n1 (sym_eq nat n1 (next g n0) H10))) h1 -(sym_eq nat h1 O H9))) H8)) H7 H5))) | (leq_head a3 a4 H5 a5 a6 H6) -\Rightarrow (\lambda (H7: (eq A (AHead a3 a5) (ASort O (next g -n0)))).(\lambda (H8: (eq A (AHead a4 a6) (AHead a (asucc g a0)))).((let H9 -\def (eq_ind A (AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda -(_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow -True])) I (ASort O (next g n0)) H7) in (False_ind ((eq A (AHead a4 a6) (AHead -a (asucc g a0))) \to ((leq g a3 a4) \to ((leq g a5 a6) \to (leq g (ASort O -n0) (AHead a a0))))) H9)) H8 H5 H6)))]) in (H5 (refl_equal A (ASort O (next g -n0))) (refl_equal A (AHead a (asucc g a0)))))))) (\lambda (n1: nat).(\lambda -(_: (((((leq g (asucc g (ASort n1 n0)) (asucc g a)) \to (leq g (ASort n1 n0) -a))) \to ((((leq g (asucc g (ASort n1 n0)) (asucc g a0)) \to (leq g (ASort n1 -n0) a0))) \to ((leq g (asucc g (ASort n1 n0)) (asucc g (AHead a a0))) \to -(leq g (ASort n1 n0) (AHead a a0))))))).(\lambda (_: (((leq g (asucc g (ASort -(S n1) n0)) (asucc g a)) \to (leq g (ASort (S n1) n0) a)))).(\lambda (_: -(((leq g (asucc g (ASort (S n1) n0)) (asucc g a0)) \to (leq g (ASort (S n1) -n0) a0)))).(\lambda (H4: (leq g (asucc g (ASort (S n1) n0)) (asucc g (AHead a -a0)))).(let H5 \def (match H4 in leq return (\lambda (a3: A).(\lambda (a4: -A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (ASort n1 n0)) \to ((eq A a4 (AHead -a (asucc g a0))) \to (leq g (ASort (S n1) n0) (AHead a a0))))))) with -[(leq_sort h1 h2 n2 n3 k H5) \Rightarrow (\lambda (H6: (eq A (ASort h1 n2) -(ASort n1 n0))).(\lambda (H7: (eq A (ASort h2 n3) (AHead a (asucc g -a0)))).((let H8 \def (f_equal A nat (\lambda (e: A).(match e in A return -(\lambda (_: A).nat) with [(ASort _ n4) \Rightarrow n4 | (AHead _ _) -\Rightarrow n2])) (ASort h1 n2) (ASort n1 n0) H6) in ((let H9 \def (f_equal A -nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort n4 -_) \Rightarrow n4 | (AHead _ _) \Rightarrow h1])) (ASort h1 n2) (ASort n1 n0) -H6) in (eq_ind nat n1 (\lambda (n4: nat).((eq nat n2 n0) \to ((eq A (ASort h2 -n3) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort n4 n2) k) (aplus g -(ASort h2 n3) k)) \to (leq g (ASort (S n1) n0) (AHead a a0)))))) (\lambda -(H10: (eq nat n2 n0)).(eq_ind nat n0 (\lambda (n4: nat).((eq A (ASort h2 n3) -(AHead a (asucc g a0))) \to ((eq A (aplus g (ASort n1 n4) k) (aplus g (ASort -h2 n3) k)) \to (leq g (ASort (S n1) n0) (AHead a a0))))) (\lambda (H11: (eq A -(ASort h2 n3) (AHead a (asucc g a0)))).(let H12 \def (eq_ind A (ASort h2 n3) -(\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) -\Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) -H11) in (False_ind ((eq A (aplus g (ASort n1 n0) k) (aplus g (ASort h2 n3) -k)) \to (leq g (ASort (S n1) n0) (AHead a a0))) H12))) n2 (sym_eq nat n2 n0 -H10))) h1 (sym_eq nat h1 n1 H9))) H8)) H7 H5))) | (leq_head a3 a4 H5 a5 a6 -H6) \Rightarrow (\lambda (H7: (eq A (AHead a3 a5) (ASort n1 n0))).(\lambda -(H8: (eq A (AHead a4 a6) (AHead a (asucc g a0)))).((let H9 \def (eq_ind A -(AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with -[(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 -n0) H7) in (False_ind ((eq A (AHead a4 a6) (AHead a (asucc g a0))) \to ((leq -g a3 a4) \to ((leq g a5 a6) \to (leq g (ASort (S n1) n0) (AHead a a0))))) -H9)) H8 H5 H6)))]) in (H5 (refl_equal A (ASort n1 n0)) (refl_equal A (AHead a -(asucc g a0)))))))))) n H H0 H1)))))) a2)))) (\lambda (a: A).(\lambda (_: -((\forall (a2: A).((leq g (asucc g a) (asucc g a2)) \to (leq g a -a2))))).(\lambda (a0: A).(\lambda (H0: ((\forall (a2: A).((leq g (asucc g a0) -(asucc g a2)) \to (leq g a0 a2))))).(\lambda (a2: A).(A_ind (\lambda (a3: -A).((leq g (asucc g (AHead a a0)) (asucc g a3)) \to (leq g (AHead a a0) a3))) -(\lambda (n: nat).(\lambda (n0: nat).(\lambda (H1: (leq g (asucc g (AHead a -a0)) (asucc g (ASort n n0)))).(nat_ind (\lambda (n1: nat).((leq g (asucc g -(AHead a a0)) (asucc g (ASort n1 n0))) \to (leq g (AHead a a0) (ASort n1 -n0)))) (\lambda (H2: (leq g (asucc g (AHead a a0)) (asucc g (ASort O -n0)))).(let H3 \def (match H2 in leq return (\lambda (a3: A).(\lambda (a4: -A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (AHead a (asucc g a0))) \to ((eq A -a4 (ASort O (next g n0))) \to (leq g (AHead a a0) (ASort O n0))))))) with -[(leq_sort h1 h2 n1 n2 k H3) \Rightarrow (\lambda (H4: (eq A (ASort h1 n1) -(AHead a (asucc g a0)))).(\lambda (H5: (eq A (ASort h2 n2) (ASort O (next g -n0)))).((let H6 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) -\Rightarrow False])) I (AHead a (asucc g a0)) H4) in (False_ind ((eq A (ASort -h2 n2) (ASort O (next g n0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g -(ASort h2 n2) k)) \to (leq g (AHead a a0) (ASort O n0)))) H6)) H5 H3))) | -(leq_head a3 a4 H3 a5 a6 H4) \Rightarrow (\lambda (H5: (eq A (AHead a3 a5) -(AHead a (asucc g a0)))).(\lambda (H6: (eq A (AHead a4 a6) (ASort O (next g -n0)))).((let H7 \def (f_equal A A (\lambda (e: A).(match e in A return -(\lambda (_: A).A) with [(ASort _ _) \Rightarrow a5 | (AHead _ a7) -\Rightarrow a7])) (AHead a3 a5) (AHead a (asucc g a0)) H5) in ((let H8 \def -(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with -[(ASort _ _) \Rightarrow a3 | (AHead a7 _) \Rightarrow a7])) (AHead a3 a5) -(AHead a (asucc g a0)) H5) in (eq_ind A a (\lambda (a7: A).((eq A a5 (asucc g -a0)) \to ((eq A (AHead a4 a6) (ASort O (next g n0))) \to ((leq g a7 a4) \to -((leq g a5 a6) \to (leq g (AHead a a0) (ASort O n0))))))) (\lambda (H9: (eq A -a5 (asucc g a0))).(eq_ind A (asucc g a0) (\lambda (a7: A).((eq A (AHead a4 -a6) (ASort O (next g n0))) \to ((leq g a a4) \to ((leq g a7 a6) \to (leq g -(AHead a a0) (ASort O n0)))))) (\lambda (H10: (eq A (AHead a4 a6) (ASort O -(next g n0)))).(let H11 \def (eq_ind A (AHead a4 a6) (\lambda (e: A).(match e -in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | -(AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H10) in (False_ind -((leq g a a4) \to ((leq g (asucc g a0) a6) \to (leq g (AHead a a0) (ASort O -n0)))) H11))) a5 (sym_eq A a5 (asucc g a0) H9))) a3 (sym_eq A a3 a H8))) H7)) -H6 H3 H4)))]) in (H3 (refl_equal A (AHead a (asucc g a0))) (refl_equal A -(ASort O (next g n0)))))) (\lambda (n1: nat).(\lambda (_: (((leq g (asucc g -(AHead a a0)) (asucc g (ASort n1 n0))) \to (leq g (AHead a a0) (ASort n1 -n0))))).(\lambda (H2: (leq g (asucc g (AHead a a0)) (asucc g (ASort (S n1) -n0)))).(let H3 \def (match H2 in leq return (\lambda (a3: A).(\lambda (a4: -A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (AHead a (asucc g a0))) \to ((eq A -a4 (ASort n1 n0)) \to (leq g (AHead a a0) (ASort (S n1) n0))))))) with -[(leq_sort h1 h2 n2 n3 k H3) \Rightarrow (\lambda (H4: (eq A (ASort h1 n2) -(AHead a (asucc g a0)))).(\lambda (H5: (eq A (ASort h2 n3) (ASort n1 -n0))).((let H6 \def (eq_ind A (ASort h1 n2) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) -\Rightarrow False])) I (AHead a (asucc g a0)) H4) in (False_ind ((eq A (ASort -h2 n3) (ASort n1 n0)) \to ((eq A (aplus g (ASort h1 n2) k) (aplus g (ASort h2 -n3) k)) \to (leq g (AHead a a0) (ASort (S n1) n0)))) H6)) H5 H3))) | -(leq_head a3 a4 H3 a5 a6 H4) \Rightarrow (\lambda (H5: (eq A (AHead a3 a5) -(AHead a (asucc g a0)))).(\lambda (H6: (eq A (AHead a4 a6) (ASort n1 -n0))).((let H7 \def (f_equal A A (\lambda (e: A).(match e in A return -(\lambda (_: A).A) with [(ASort _ _) \Rightarrow a5 | (AHead _ a7) -\Rightarrow a7])) (AHead a3 a5) (AHead a (asucc g a0)) H5) in ((let H8 \def -(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with -[(ASort _ _) \Rightarrow a3 | (AHead a7 _) \Rightarrow a7])) (AHead a3 a5) -(AHead a (asucc g a0)) H5) in (eq_ind A a (\lambda (a7: A).((eq A a5 (asucc g -a0)) \to ((eq A (AHead a4 a6) (ASort n1 n0)) \to ((leq g a7 a4) \to ((leq g -a5 a6) \to (leq g (AHead a a0) (ASort (S n1) n0))))))) (\lambda (H9: (eq A a5 -(asucc g a0))).(eq_ind A (asucc g a0) (\lambda (a7: A).((eq A (AHead a4 a6) -(ASort n1 n0)) \to ((leq g a a4) \to ((leq g a7 a6) \to (leq g (AHead a a0) -(ASort (S n1) n0)))))) (\lambda (H10: (eq A (AHead a4 a6) (ASort n1 -n0))).(let H11 \def (eq_ind A (AHead a4 a6) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ -_) \Rightarrow True])) I (ASort n1 n0) H10) in (False_ind ((leq g a a4) \to -((leq g (asucc g a0) a6) \to (leq g (AHead a a0) (ASort (S n1) n0)))) H11))) -a5 (sym_eq A a5 (asucc g a0) H9))) a3 (sym_eq A a3 a H8))) H7)) H6 H3 H4)))]) -in (H3 (refl_equal A (AHead a (asucc g a0))) (refl_equal A (ASort n1 -n0))))))) n H1)))) (\lambda (a3: A).(\lambda (_: (((leq g (asucc g (AHead a -a0)) (asucc g a3)) \to (leq g (AHead a a0) a3)))).(\lambda (a4: A).(\lambda -(_: (((leq g (asucc g (AHead a a0)) (asucc g a4)) \to (leq g (AHead a a0) -a4)))).(\lambda (H3: (leq g (asucc g (AHead a a0)) (asucc g (AHead a3 -a4)))).(let H4 \def (match H3 in leq return (\lambda (a5: A).(\lambda (a6: -A).(\lambda (_: (leq ? a5 a6)).((eq A a5 (AHead a (asucc g a0))) \to ((eq A -a6 (AHead a3 (asucc g a4))) \to (leq g (AHead a a0) (AHead a3 a4))))))) with -[(leq_sort h1 h2 n1 n2 k H4) \Rightarrow (\lambda (H5: (eq A (ASort h1 n1) -(AHead a (asucc g a0)))).(\lambda (H6: (eq A (ASort h2 n2) (AHead a3 (asucc g -a4)))).((let H7 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) -\Rightarrow False])) I (AHead a (asucc g a0)) H5) in (False_ind ((eq A (ASort -h2 n2) (AHead a3 (asucc g a4))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g -(ASort h2 n2) k)) \to (leq g (AHead a a0) (AHead a3 a4)))) H7)) H6 H4))) | -(leq_head a5 a6 H4 a7 a8 H5) \Rightarrow (\lambda (H6: (eq A (AHead a5 a7) -(AHead a (asucc g a0)))).(\lambda (H7: (eq A (AHead a6 a8) (AHead a3 (asucc g -a4)))).((let H8 \def (f_equal A A (\lambda (e: A).(match e in A return -(\lambda (_: A).A) with [(ASort _ _) \Rightarrow a7 | (AHead _ a9) -\Rightarrow a9])) (AHead a5 a7) (AHead a (asucc g a0)) H6) in ((let H9 \def -(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with -[(ASort _ _) \Rightarrow a5 | (AHead a9 _) \Rightarrow a9])) (AHead a5 a7) -(AHead a (asucc g a0)) H6) in (eq_ind A a (\lambda (a9: A).((eq A a7 (asucc g -a0)) \to ((eq A (AHead a6 a8) (AHead a3 (asucc g a4))) \to ((leq g a9 a6) \to -((leq g a7 a8) \to (leq g (AHead a a0) (AHead a3 a4))))))) (\lambda (H10: (eq -A a7 (asucc g a0))).(eq_ind A (asucc g a0) (\lambda (a9: A).((eq A (AHead a6 -a8) (AHead a3 (asucc g a4))) \to ((leq g a a6) \to ((leq g a9 a8) \to (leq g -(AHead a a0) (AHead a3 a4)))))) (\lambda (H11: (eq A (AHead a6 a8) (AHead a3 -(asucc g a4)))).(let H12 \def (f_equal A A (\lambda (e: A).(match e in A -return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a8 | (AHead _ a9) -\Rightarrow a9])) (AHead a6 a8) (AHead a3 (asucc g a4)) H11) in ((let H13 +(AHead a a0)))).(let H_x \def (leq_gen_sort1 g O (next g n0) (AHead a (asucc +g a0)) H4) in (let H5 \def H_x in (ex2_3_ind nat nat nat (\lambda (n2: +nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort O (next g +n0)) k) (aplus g (ASort h2 n2) k))))) (\lambda (n2: nat).(\lambda (h2: +nat).(\lambda (_: nat).(eq A (AHead a (asucc g a0)) (ASort h2 n2))))) (leq g +(ASort O n0) (AHead a a0)) (\lambda (x0: nat).(\lambda (x1: nat).(\lambda +(x2: nat).(\lambda (_: (eq A (aplus g (ASort O (next g n0)) x2) (aplus g +(ASort x1 x0) x2))).(\lambda (H7: (eq A (AHead a (asucc g a0)) (ASort x1 +x0))).(let H8 \def (eq_ind A (AHead a (asucc g a0)) (\lambda (ee: A).(match +ee in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | +(AHead _ _) \Rightarrow True])) I (ASort x1 x0) H7) in (False_ind (leq g +(ASort O n0) (AHead a a0)) H8))))))) H5)))))) (\lambda (n1: nat).(\lambda (_: +(((((leq g (asucc g (ASort n1 n0)) (asucc g a)) \to (leq g (ASort n1 n0) a))) +\to ((((leq g (asucc g (ASort n1 n0)) (asucc g a0)) \to (leq g (ASort n1 n0) +a0))) \to ((leq g (asucc g (ASort n1 n0)) (asucc g (AHead a a0))) \to (leq g +(ASort n1 n0) (AHead a a0))))))).(\lambda (_: (((leq g (asucc g (ASort (S n1) +n0)) (asucc g a)) \to (leq g (ASort (S n1) n0) a)))).(\lambda (_: (((leq g +(asucc g (ASort (S n1) n0)) (asucc g a0)) \to (leq g (ASort (S n1) n0) +a0)))).(\lambda (H4: (leq g (asucc g (ASort (S n1) n0)) (asucc g (AHead a +a0)))).(let H_x \def (leq_gen_sort1 g n1 n0 (AHead a (asucc g a0)) H4) in +(let H5 \def H_x in (ex2_3_ind nat nat nat (\lambda (n2: nat).(\lambda (h2: +nat).(\lambda (k: nat).(eq A (aplus g (ASort n1 n0) k) (aplus g (ASort h2 n2) +k))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A (AHead a +(asucc g a0)) (ASort h2 n2))))) (leq g (ASort (S n1) n0) (AHead a a0)) +(\lambda (x0: nat).(\lambda (x1: nat).(\lambda (x2: nat).(\lambda (_: (eq A +(aplus g (ASort n1 n0) x2) (aplus g (ASort x1 x0) x2))).(\lambda (H7: (eq A +(AHead a (asucc g a0)) (ASort x1 x0))).(let H8 \def (eq_ind A (AHead a (asucc +g a0)) (\lambda (ee: A).(match ee in A return (\lambda (_: A).Prop) with +[(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort x1 +x0) H7) in (False_ind (leq g (ASort (S n1) n0) (AHead a a0)) H8))))))) +H5)))))))) n H H0 H1)))))) a2)))) (\lambda (a: A).(\lambda (_: ((\forall (a2: +A).((leq g (asucc g a) (asucc g a2)) \to (leq g a a2))))).(\lambda (a0: +A).(\lambda (H0: ((\forall (a2: A).((leq g (asucc g a0) (asucc g a2)) \to +(leq g a0 a2))))).(\lambda (a2: A).(A_ind (\lambda (a3: A).((leq g (asucc g +(AHead a a0)) (asucc g a3)) \to (leq g (AHead a a0) a3))) (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (H1: (leq g (asucc g (AHead a a0)) (asucc g +(ASort n n0)))).(nat_ind (\lambda (n1: nat).((leq g (asucc g (AHead a a0)) +(asucc g (ASort n1 n0))) \to (leq g (AHead a a0) (ASort n1 n0)))) (\lambda +(H2: (leq g (asucc g (AHead a a0)) (asucc g (ASort O n0)))).(let H_x \def +(leq_gen_head1 g a (asucc g a0) (ASort O (next g n0)) H2) in (let H3 \def H_x +in (ex3_2_ind A A (\lambda (a3: A).(\lambda (_: A).(leq g a a3))) (\lambda +(_: A).(\lambda (a4: A).(leq g (asucc g a0) a4))) (\lambda (a3: A).(\lambda +(a4: A).(eq A (ASort O (next g n0)) (AHead a3 a4)))) (leq g (AHead a a0) +(ASort O n0)) (\lambda (x0: A).(\lambda (x1: A).(\lambda (_: (leq g a +x0)).(\lambda (_: (leq g (asucc g a0) x1)).(\lambda (H6: (eq A (ASort O (next +g n0)) (AHead x0 x1))).(let H7 \def (eq_ind A (ASort O (next g n0)) (\lambda +(ee: A).(match ee in A return (\lambda (_: A).Prop) with [(ASort _ _) +\Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead x0 x1) H6) in +(False_ind (leq g (AHead a a0) (ASort O n0)) H7))))))) H3)))) (\lambda (n1: +nat).(\lambda (_: (((leq g (asucc g (AHead a a0)) (asucc g (ASort n1 n0))) +\to (leq g (AHead a a0) (ASort n1 n0))))).(\lambda (H2: (leq g (asucc g +(AHead a a0)) (asucc g (ASort (S n1) n0)))).(let H_x \def (leq_gen_head1 g a +(asucc g a0) (ASort n1 n0) H2) in (let H3 \def H_x in (ex3_2_ind A A (\lambda +(a3: A).(\lambda (_: A).(leq g a a3))) (\lambda (_: A).(\lambda (a4: A).(leq +g (asucc g a0) a4))) (\lambda (a3: A).(\lambda (a4: A).(eq A (ASort n1 n0) +(AHead a3 a4)))) (leq g (AHead a a0) (ASort (S n1) n0)) (\lambda (x0: +A).(\lambda (x1: A).(\lambda (_: (leq g a x0)).(\lambda (_: (leq g (asucc g +a0) x1)).(\lambda (H6: (eq A (ASort n1 n0) (AHead x0 x1))).(let H7 \def +(eq_ind A (ASort n1 n0) (\lambda (ee: A).(match ee in A return (\lambda (_: +A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow +False])) I (AHead x0 x1) H6) in (False_ind (leq g (AHead a a0) (ASort (S n1) +n0)) H7))))))) H3)))))) n H1)))) (\lambda (a3: A).(\lambda (_: (((leq g +(asucc g (AHead a a0)) (asucc g a3)) \to (leq g (AHead a a0) a3)))).(\lambda +(a4: A).(\lambda (_: (((leq g (asucc g (AHead a a0)) (asucc g a4)) \to (leq g +(AHead a a0) a4)))).(\lambda (H3: (leq g (asucc g (AHead a a0)) (asucc g +(AHead a3 a4)))).(let H_x \def (leq_gen_head1 g a (asucc g a0) (AHead a3 +(asucc g a4)) H3) in (let H4 \def H_x in (ex3_2_ind A A (\lambda (a5: +A).(\lambda (_: A).(leq g a a5))) (\lambda (_: A).(\lambda (a6: A).(leq g +(asucc g a0) a6))) (\lambda (a5: A).(\lambda (a6: A).(eq A (AHead a3 (asucc g +a4)) (AHead a5 a6)))) (leq g (AHead a a0) (AHead a3 a4)) (\lambda (x0: +A).(\lambda (x1: A).(\lambda (H5: (leq g a x0)).(\lambda (H6: (leq g (asucc g +a0) x1)).(\lambda (H7: (eq A (AHead a3 (asucc g a4)) (AHead x0 x1))).(let H8 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) -with [(ASort _ _) \Rightarrow a6 | (AHead a9 _) \Rightarrow a9])) (AHead a6 -a8) (AHead a3 (asucc g a4)) H11) in (eq_ind A a3 (\lambda (a9: A).((eq A a8 -(asucc g a4)) \to ((leq g a a9) \to ((leq g (asucc g a0) a8) \to (leq g -(AHead a a0) (AHead a3 a4)))))) (\lambda (H14: (eq A a8 (asucc g -a4))).(eq_ind A (asucc g a4) (\lambda (a9: A).((leq g a a3) \to ((leq g -(asucc g a0) a9) \to (leq g (AHead a a0) (AHead a3 a4))))) (\lambda (H15: -(leq g a a3)).(\lambda (H16: (leq g (asucc g a0) (asucc g a4))).(leq_head g a -a3 H15 a0 a4 (H0 a4 H16)))) a8 (sym_eq A a8 (asucc g a4) H14))) a6 (sym_eq A -a6 a3 H13))) H12))) a7 (sym_eq A a7 (asucc g a0) H10))) a5 (sym_eq A a5 a -H9))) H8)) H7 H4 H5)))]) in (H4 (refl_equal A (AHead a (asucc g a0))) -(refl_equal A (AHead a3 (asucc g a4)))))))))) a2)))))) a1)). +with [(ASort _ _) \Rightarrow a3 | (AHead a5 _) \Rightarrow a5])) (AHead a3 +(asucc g a4)) (AHead x0 x1) H7) in ((let H9 \def (f_equal A A (\lambda (e: +A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow +((let rec asucc (g0: G) (l: A) on l: A \def (match l with [(ASort n0 n) +\Rightarrow (match n0 with [O \Rightarrow (ASort O (next g0 n)) | (S h) +\Rightarrow (ASort h n)]) | (AHead a5 a6) \Rightarrow (AHead a5 (asucc g0 +a6))]) in asucc) g a4) | (AHead _ a5) \Rightarrow a5])) (AHead a3 (asucc g +a4)) (AHead x0 x1) H7) in (\lambda (H10: (eq A a3 x0)).(let H11 \def +(eq_ind_r A x1 (\lambda (a5: A).(leq g (asucc g a0) a5)) H6 (asucc g a4) H9) +in (let H12 \def (eq_ind_r A x0 (\lambda (a5: A).(leq g a a5)) H5 a3 H10) in +(leq_head g a a3 H12 a0 a4 (H0 a4 H11)))))) H8))))))) H4)))))))) a2)))))) +a1)). theorem leq_asucc: \forall (g: G).(\forall (a: A).(ex A (\lambda (a0: A).(leq g a (asucc g @@ -515,103 +343,51 @@ A).((leq g (AHead a a2) (asucc g a)) \to (\forall (P: Prop).P)))) (\lambda \Rightarrow (ASort h n0)]))).(\lambda (P: Prop).(nat_ind (\lambda (n1: nat).((leq g (AHead (ASort n1 n0) a2) (match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)])) \to P)) (\lambda (H0: (leq g -(AHead (ASort O n0) a2) (ASort O (next g n0)))).(let H1 \def (match H0 in leq -return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a -(AHead (ASort O n0) a2)) \to ((eq A a0 (ASort O (next g n0))) \to P))))) with -[(leq_sort h1 h2 n1 n2 k H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 n1) -(AHead (ASort O n0) a2))).(\lambda (H3: (eq A (ASort h2 n2) (ASort O (next g -n0)))).((let H4 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) -\Rightarrow False])) I (AHead (ASort O n0) a2) H2) in (False_ind ((eq A -(ASort h2 n2) (ASort O (next g n0))) \to ((eq A (aplus g (ASort h1 n1) k) -(aplus g (ASort h2 n2) k)) \to P)) H4)) H3 H1))) | (leq_head a0 a3 H1 a4 a5 -H2) \Rightarrow (\lambda (H3: (eq A (AHead a0 a4) (AHead (ASort O n0) -a2))).(\lambda (H4: (eq A (AHead a3 a5) (ASort O (next g n0)))).((let H5 \def -(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with -[(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) -(AHead (ASort O n0) a2) H3) in ((let H6 \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 a4) (AHead (ASort O n0) a2) H3) in -(eq_ind A (ASort O n0) (\lambda (a: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) -(ASort O (next g n0))) \to ((leq g a a3) \to ((leq g a4 a5) \to P))))) -(\lambda (H7: (eq A a4 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a3 a5) -(ASort O (next g n0))) \to ((leq g (ASort O n0) a3) \to ((leq g a a5) \to -P)))) (\lambda (H8: (eq A (AHead a3 a5) (ASort O (next g n0)))).(let H9 \def -(eq_ind A (AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda (_: -A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow -True])) I (ASort O (next g n0)) H8) in (False_ind ((leq g (ASort O n0) a3) -\to ((leq g a2 a5) \to P)) H9))) a4 (sym_eq A a4 a2 H7))) a0 (sym_eq A a0 -(ASort O n0) H6))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A (AHead (ASort O -n0) a2)) (refl_equal A (ASort O (next g n0)))))) (\lambda (n1: nat).(\lambda -(_: (((leq g (AHead (ASort n1 n0) a2) (match n1 with [O \Rightarrow (ASort O -(next g n0)) | (S h) \Rightarrow (ASort h n0)])) \to P))).(\lambda (H0: (leq -g (AHead (ASort (S n1) n0) a2) (ASort n1 n0))).(let H1 \def (match H0 in leq -return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a -(AHead (ASort (S n1) n0) a2)) \to ((eq A a0 (ASort n1 n0)) \to P))))) with -[(leq_sort h1 h2 n2 n3 k H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 n2) -(AHead (ASort (S n1) n0) a2))).(\lambda (H3: (eq A (ASort h2 n3) (ASort n1 -n0))).((let H4 \def (eq_ind A (ASort h1 n2) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) -\Rightarrow False])) I (AHead (ASort (S n1) n0) a2) H2) in (False_ind ((eq A -(ASort h2 n3) (ASort n1 n0)) \to ((eq A (aplus g (ASort h1 n2) k) (aplus g -(ASort h2 n3) k)) \to P)) H4)) H3 H1))) | (leq_head a0 a3 H1 a4 a5 H2) -\Rightarrow (\lambda (H3: (eq A (AHead a0 a4) (AHead (ASort (S n1) n0) -a2))).(\lambda (H4: (eq A (AHead a3 a5) (ASort n1 n0))).((let H5 \def +(AHead (ASort O n0) a2) (ASort O (next g n0)))).(let H_x \def (leq_gen_head1 +g (ASort O n0) a2 (ASort O (next g n0)) H0) in (let H1 \def H_x in (ex3_2_ind +A A (\lambda (a3: A).(\lambda (_: A).(leq g (ASort O n0) a3))) (\lambda (_: +A).(\lambda (a4: A).(leq g a2 a4))) (\lambda (a3: A).(\lambda (a4: A).(eq A +(ASort O (next g n0)) (AHead a3 a4)))) P (\lambda (x0: A).(\lambda (x1: +A).(\lambda (_: (leq g (ASort O n0) x0)).(\lambda (_: (leq g a2 x1)).(\lambda +(H4: (eq A (ASort O (next g n0)) (AHead x0 x1))).(let H5 \def (eq_ind A +(ASort O (next g n0)) (\lambda (ee: A).(match ee in A return (\lambda (_: +A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow +False])) I (AHead x0 x1) H4) in (False_ind P H5))))))) H1)))) (\lambda (n1: +nat).(\lambda (_: (((leq g (AHead (ASort n1 n0) a2) (match n1 with [O +\Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)])) \to +P))).(\lambda (H0: (leq g (AHead (ASort (S n1) n0) a2) (ASort n1 n0))).(let +H_x \def (leq_gen_head1 g (ASort (S n1) n0) a2 (ASort n1 n0) H0) in (let H1 +\def H_x in (ex3_2_ind A A (\lambda (a3: A).(\lambda (_: A).(leq g (ASort (S +n1) n0) a3))) (\lambda (_: A).(\lambda (a4: A).(leq g a2 a4))) (\lambda (a3: +A).(\lambda (a4: A).(eq A (ASort n1 n0) (AHead a3 a4)))) P (\lambda (x0: +A).(\lambda (x1: A).(\lambda (_: (leq g (ASort (S n1) n0) x0)).(\lambda (_: +(leq g a2 x1)).(\lambda (H4: (eq A (ASort n1 n0) (AHead x0 x1))).(let H5 \def +(eq_ind A (ASort n1 n0) (\lambda (ee: A).(match ee in A return (\lambda (_: +A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow +False])) I (AHead x0 x1) H4) in (False_ind P H5))))))) H1)))))) n H)))))) +(\lambda (a: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead a a2) (asucc g +a)) \to (\forall (P: Prop).P))))).(\lambda (a0: A).(\lambda (_: ((\forall +(a2: A).((leq g (AHead a0 a2) (asucc g a0)) \to (\forall (P: +Prop).P))))).(\lambda (a2: A).(\lambda (H1: (leq g (AHead (AHead a a0) a2) +(AHead a (asucc g a0)))).(\lambda (P: Prop).(let H_x \def (leq_gen_head1 g +(AHead a a0) a2 (AHead a (asucc g a0)) H1) in (let H2 \def H_x in (ex3_2_ind +A A (\lambda (a3: A).(\lambda (_: A).(leq g (AHead a a0) a3))) (\lambda (_: +A).(\lambda (a4: A).(leq g a2 a4))) (\lambda (a3: A).(\lambda (a4: A).(eq A +(AHead a (asucc g a0)) (AHead a3 a4)))) P (\lambda (x0: A).(\lambda (x1: +A).(\lambda (H3: (leq g (AHead a a0) x0)).(\lambda (H4: (leq g a2 +x1)).(\lambda (H5: (eq A (AHead a (asucc g a0)) (AHead x0 x1))).(let H6 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with -[(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) -(AHead (ASort (S n1) n0) a2) H3) in ((let H6 \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 a4) (AHead (ASort (S n1) n0) a2) H3) -in (eq_ind A (ASort (S n1) n0) (\lambda (a: A).((eq A a4 a2) \to ((eq A -(AHead a3 a5) (ASort n1 n0)) \to ((leq g a a3) \to ((leq g a4 a5) \to P))))) -(\lambda (H7: (eq A a4 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a3 a5) -(ASort n1 n0)) \to ((leq g (ASort (S n1) n0) a3) \to ((leq g a a5) \to P)))) -(\lambda (H8: (eq A (AHead a3 a5) (ASort n1 n0))).(let H9 \def (eq_ind A -(AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with -[(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 -n0) H8) in (False_ind ((leq g (ASort (S n1) n0) a3) \to ((leq g a2 a5) \to -P)) H9))) a4 (sym_eq A a4 a2 H7))) a0 (sym_eq A a0 (ASort (S n1) n0) H6))) -H5)) H4 H1 H2)))]) in (H1 (refl_equal A (AHead (ASort (S n1) n0) a2)) -(refl_equal A (ASort n1 n0))))))) n H)))))) (\lambda (a: A).(\lambda (_: -((\forall (a2: A).((leq g (AHead a a2) (asucc g a)) \to (\forall (P: -Prop).P))))).(\lambda (a0: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead -a0 a2) (asucc g a0)) \to (\forall (P: Prop).P))))).(\lambda (a2: A).(\lambda -(H1: (leq g (AHead (AHead a a0) a2) (AHead a (asucc g a0)))).(\lambda (P: -Prop).(let H2 \def (match H1 in leq return (\lambda (a3: A).(\lambda (a4: -A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (AHead (AHead a a0) a2)) \to ((eq A -a4 (AHead a (asucc g a0))) \to P))))) with [(leq_sort h1 h2 n1 n2 k H2) -\Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead (AHead a a0) -a2))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).((let H5 -\def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A return (\lambda -(_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow -False])) I (AHead (AHead a a0) a2) H3) in (False_ind ((eq A (ASort h2 n2) -(AHead a (asucc g a0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort -h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head a3 a4 H2 a5 a6 H3) \Rightarrow -(\lambda (H4: (eq A (AHead a3 a5) (AHead (AHead a a0) a2))).(\lambda (H5: (eq -A (AHead a4 a6) (AHead a (asucc g a0)))).((let H6 \def (f_equal A A (\lambda -(e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow -a5 | (AHead _ a7) \Rightarrow a7])) (AHead a3 a5) (AHead (AHead a a0) a2) H4) -in ((let H7 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda -(_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead a7 _) \Rightarrow a7])) -(AHead a3 a5) (AHead (AHead a a0) a2) H4) in (eq_ind A (AHead a a0) (\lambda -(a7: A).((eq A a5 a2) \to ((eq A (AHead a4 a6) (AHead a (asucc g a0))) \to -((leq g a7 a4) \to ((leq g a5 a6) \to P))))) (\lambda (H8: (eq A a5 -a2)).(eq_ind A a2 (\lambda (a7: A).((eq A (AHead a4 a6) (AHead a (asucc g -a0))) \to ((leq g (AHead a a0) a4) \to ((leq g a7 a6) \to P)))) (\lambda (H9: -(eq A (AHead a4 a6) (AHead a (asucc g a0)))).(let H10 \def (f_equal A A -(\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a6 | (AHead _ a7) \Rightarrow a7])) (AHead a4 a6) (AHead a (asucc -g a0)) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e in A -return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead a7 _) -\Rightarrow a7])) (AHead a4 a6) (AHead a (asucc g a0)) H9) in (eq_ind A a -(\lambda (a7: A).((eq A a6 (asucc g a0)) \to ((leq g (AHead a a0) a7) \to -((leq g a2 a6) \to P)))) (\lambda (H12: (eq A a6 (asucc g a0))).(eq_ind A -(asucc g a0) (\lambda (a7: A).((leq g (AHead a a0) a) \to ((leq g a2 a7) \to -P))) (\lambda (H13: (leq g (AHead a a0) a)).(\lambda (_: (leq g a2 (asucc g -a0))).(leq_ahead_false_1 g a a0 H13 P))) a6 (sym_eq A a6 (asucc g a0) H12))) -a4 (sym_eq A a4 a H11))) H10))) a5 (sym_eq A a5 a2 H8))) a3 (sym_eq A a3 -(AHead a a0) H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (AHead (AHead a -a0) a2)) (refl_equal A (AHead a (asucc g a0)))))))))))) a1)). +[(ASort _ _) \Rightarrow a | (AHead a3 _) \Rightarrow a3])) (AHead a (asucc g +a0)) (AHead x0 x1) H5) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e +in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow ((let rec asucc +(g0: G) (l: A) on l: A \def (match l with [(ASort n0 n) \Rightarrow (match n0 +with [O \Rightarrow (ASort O (next g0 n)) | (S h) \Rightarrow (ASort h n)]) | +(AHead a3 a4) \Rightarrow (AHead a3 (asucc g0 a4))]) in asucc) g a0) | (AHead +_ a3) \Rightarrow a3])) (AHead a (asucc g a0)) (AHead x0 x1) H5) in (\lambda +(H8: (eq A a x0)).(let H9 \def (eq_ind_r A x1 (\lambda (a3: A).(leq g a2 a3)) +H4 (asucc g a0) H7) in (let H10 \def (eq_ind_r A x0 (\lambda (a3: A).(leq g +(AHead a a0) a3)) H3 a H8) in (leq_ahead_false_1 g a a0 H10 P))))) H6))))))) +H2)))))))))) a1)). theorem leq_asucc_false: \forall (g: G).(\forall (a: A).((leq g (asucc g a) a) \to (\forall (P: @@ -623,120 +399,66 @@ a0) \to (\forall (P: Prop).P))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda \Rightarrow (ASort h n0)]) (ASort n n0))).(\lambda (P: Prop).(nat_ind (\lambda (n1: nat).((leq g (match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) (ASort n1 n0)) \to P)) (\lambda (H0: -(leq g (ASort O (next g n0)) (ASort O n0))).(let H1 \def (match H0 in leq -return (\lambda (a0: A).(\lambda (a1: A).(\lambda (_: (leq ? a0 a1)).((eq A -a0 (ASort O (next g n0))) \to ((eq A a1 (ASort O n0)) \to P))))) with -[(leq_sort h1 h2 n1 n2 k H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 n1) -(ASort O (next g n0)))).(\lambda (H3: (eq A (ASort h2 n2) (ASort O -n0))).((let H4 \def (f_equal A nat (\lambda (e: A).(match e in A return -(\lambda (_: A).nat) with [(ASort _ n3) \Rightarrow n3 | (AHead _ _) -\Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H2) in ((let H5 \def -(f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort n3 _) \Rightarrow n3 | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) -(ASort O (next g n0)) H2) in (eq_ind nat O (\lambda (n3: nat).((eq nat n1 -(next g n0)) \to ((eq A (ASort h2 n2) (ASort O n0)) \to ((eq A (aplus g -(ASort n3 n1) k) (aplus g (ASort h2 n2) k)) \to P)))) (\lambda (H6: (eq nat -n1 (next g n0))).(eq_ind nat (next g n0) (\lambda (n3: nat).((eq A (ASort h2 -n2) (ASort O n0)) \to ((eq A (aplus g (ASort O n3) k) (aplus g (ASort h2 n2) -k)) \to P))) (\lambda (H7: (eq A (ASort h2 n2) (ASort O n0))).(let H8 \def -(f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort _ n3) \Rightarrow n3 | (AHead _ _) \Rightarrow n2])) (ASort h2 n2) -(ASort O n0) H7) in ((let H9 \def (f_equal A nat (\lambda (e: A).(match e in -A return (\lambda (_: A).nat) with [(ASort n3 _) \Rightarrow n3 | (AHead _ _) -\Rightarrow h2])) (ASort h2 n2) (ASort O n0) H7) in (eq_ind nat O (\lambda -(n3: nat).((eq nat n2 n0) \to ((eq A (aplus g (ASort O (next g n0)) k) (aplus -g (ASort n3 n2) k)) \to P))) (\lambda (H10: (eq nat n2 n0)).(eq_ind nat n0 -(\lambda (n3: nat).((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort O -n3) k)) \to P)) (\lambda (H11: (eq A (aplus g (ASort O (next g n0)) k) (aplus -g (ASort O n0) k))).(let H12 \def (eq_ind_r A (aplus g (ASort O (next g n0)) -k) (\lambda (a0: A).(eq A a0 (aplus g (ASort O n0) k))) H11 (aplus g (ASort O -n0) (S k)) (aplus_sort_O_S_simpl g n0 k)) in (let H_y \def (aplus_inj g (S k) -k (ASort O n0) H12) in (le_Sx_x k (eq_ind_r nat k (\lambda (n3: nat).(le n3 -k)) (le_n k) (S k) H_y) P)))) n2 (sym_eq nat n2 n0 H10))) h2 (sym_eq nat h2 O -H9))) H8))) n1 (sym_eq nat n1 (next g n0) H6))) h1 (sym_eq nat h1 O H5))) -H4)) H3 H1))) | (leq_head a1 a2 H1 a3 a4 H2) \Rightarrow (\lambda (H3: (eq A -(AHead a1 a3) (ASort O (next g n0)))).(\lambda (H4: (eq A (AHead a2 a4) -(ASort O n0))).((let H5 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e -in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | -(AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H3) in (False_ind -((eq A (AHead a2 a4) (ASort O n0)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to -P))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A (ASort O (next g n0))) -(refl_equal A (ASort O n0))))) (\lambda (n1: nat).(\lambda (_: (((leq g -(match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow -(ASort h n0)]) (ASort n1 n0)) \to P))).(\lambda (H0: (leq g (ASort n1 n0) -(ASort (S n1) n0))).(let H1 \def (match H0 in leq return (\lambda (a0: -A).(\lambda (a1: A).(\lambda (_: (leq ? a0 a1)).((eq A a0 (ASort n1 n0)) \to -((eq A a1 (ASort (S n1) n0)) \to P))))) with [(leq_sort h1 h2 n2 n3 k H1) -\Rightarrow (\lambda (H2: (eq A (ASort h1 n2) (ASort n1 n0))).(\lambda (H3: -(eq A (ASort h2 n3) (ASort (S n1) n0))).((let H4 \def (f_equal A nat (\lambda -(e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n4) -\Rightarrow n4 | (AHead _ _) \Rightarrow n2])) (ASort h1 n2) (ASort n1 n0) -H2) in ((let H5 \def (f_equal A nat (\lambda (e: A).(match e in A return -(\lambda (_: A).nat) with [(ASort n4 _) \Rightarrow n4 | (AHead _ _) -\Rightarrow h1])) (ASort h1 n2) (ASort n1 n0) H2) in (eq_ind nat n1 (\lambda -(n4: nat).((eq nat n2 n0) \to ((eq A (ASort h2 n3) (ASort (S n1) n0)) \to -((eq A (aplus g (ASort n4 n2) k) (aplus g (ASort h2 n3) k)) \to P)))) -(\lambda (H6: (eq nat n2 n0)).(eq_ind nat n0 (\lambda (n4: nat).((eq A (ASort -h2 n3) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort n1 n4) k) (aplus g -(ASort h2 n3) k)) \to P))) (\lambda (H7: (eq A (ASort h2 n3) (ASort (S n1) -n0))).(let H8 \def (f_equal A nat (\lambda (e: A).(match e in A return -(\lambda (_: A).nat) with [(ASort _ n4) \Rightarrow n4 | (AHead _ _) -\Rightarrow n3])) (ASort h2 n3) (ASort (S n1) n0) H7) in ((let H9 \def +(leq g (ASort O (next g n0)) (ASort O n0))).(let H_x \def (leq_gen_sort1 g O +(next g n0) (ASort O n0) H0) in (let H1 \def H_x in (ex2_3_ind nat nat nat +(\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort +O (next g n0)) k) (aplus g (ASort h2 n2) k))))) (\lambda (n2: nat).(\lambda +(h2: nat).(\lambda (_: nat).(eq A (ASort O n0) (ASort h2 n2))))) P (\lambda +(x0: nat).(\lambda (x1: nat).(\lambda (x2: nat).(\lambda (H2: (eq A (aplus g +(ASort O (next g n0)) x2) (aplus g (ASort x1 x0) x2))).(\lambda (H3: (eq A +(ASort O n0) (ASort x1 x0))).(let H4 \def (f_equal A nat (\lambda (e: +A).(match e in A return (\lambda (_: A).nat) with [(ASort n1 _) \Rightarrow +n1 | (AHead _ _) \Rightarrow O])) (ASort O n0) (ASort x1 x0) H3) in ((let H5 +\def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) +with [(ASort _ n1) \Rightarrow n1 | (AHead _ _) \Rightarrow n0])) (ASort O +n0) (ASort x1 x0) H3) in (\lambda (H6: (eq nat O x1)).(let H7 \def (eq_ind_r +nat x1 (\lambda (n1: nat).(eq A (aplus g (ASort O (next g n0)) x2) (aplus g +(ASort n1 x0) x2))) H2 O H6) in (let H8 \def (eq_ind_r nat x0 (\lambda (n1: +nat).(eq A (aplus g (ASort O (next g n0)) x2) (aplus g (ASort O n1) x2))) H7 +n0 H5) in (let H9 \def (eq_ind_r A (aplus g (ASort O (next g n0)) x2) +(\lambda (a0: A).(eq A a0 (aplus g (ASort O n0) x2))) H8 (aplus g (ASort O +n0) (S x2)) (aplus_sort_O_S_simpl g n0 x2)) in (let H_y \def (aplus_inj g (S +x2) x2 (ASort O n0) H9) in (le_Sx_x x2 (eq_ind_r nat x2 (\lambda (n1: +nat).(le n1 x2)) (le_n x2) (S x2) H_y) P))))))) H4))))))) H1)))) (\lambda +(n1: nat).(\lambda (_: (((leq g (match n1 with [O \Rightarrow (ASort O (next +g n0)) | (S h) \Rightarrow (ASort h n0)]) (ASort n1 n0)) \to P))).(\lambda +(H0: (leq g (ASort n1 n0) (ASort (S n1) n0))).(let H_x \def (leq_gen_sort1 g +n1 n0 (ASort (S n1) n0) H0) in (let H1 \def H_x in (ex2_3_ind nat nat nat +(\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort +n1 n0) k) (aplus g (ASort h2 n2) k))))) (\lambda (n2: nat).(\lambda (h2: +nat).(\lambda (_: nat).(eq A (ASort (S n1) n0) (ASort h2 n2))))) P (\lambda +(x0: nat).(\lambda (x1: nat).(\lambda (x2: nat).(\lambda (H2: (eq A (aplus g +(ASort n1 n0) x2) (aplus g (ASort x1 x0) x2))).(\lambda (H3: (eq A (ASort (S +n1) n0) (ASort x1 x0))).(let H4 \def (f_equal A nat (\lambda (e: A).(match e +in A return (\lambda (_: A).nat) with [(ASort n2 _) \Rightarrow n2 | (AHead _ +_) \Rightarrow (S n1)])) (ASort (S n1) n0) (ASort x1 x0) H3) in ((let H5 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort n4 _) \Rightarrow n4 | (AHead _ _) \Rightarrow h2])) (ASort h2 n3) -(ASort (S n1) n0) H7) in (eq_ind nat (S n1) (\lambda (n4: nat).((eq nat n3 -n0) \to ((eq A (aplus g (ASort n1 n0) k) (aplus g (ASort n4 n3) k)) \to P))) -(\lambda (H10: (eq nat n3 n0)).(eq_ind nat n0 (\lambda (n4: nat).((eq A -(aplus g (ASort n1 n0) k) (aplus g (ASort (S n1) n4) k)) \to P)) (\lambda -(H11: (eq A (aplus g (ASort n1 n0) k) (aplus g (ASort (S n1) n0) k))).(let -H12 \def (eq_ind_r A (aplus g (ASort n1 n0) k) (\lambda (a0: A).(eq A a0 -(aplus g (ASort (S n1) n0) k))) H11 (aplus g (ASort (S n1) n0) (S k)) -(aplus_sort_S_S_simpl g n0 n1 k)) in (let H_y \def (aplus_inj g (S k) k -(ASort (S n1) n0) H12) in (le_Sx_x k (eq_ind_r nat k (\lambda (n4: nat).(le -n4 k)) (le_n k) (S k) H_y) P)))) n3 (sym_eq nat n3 n0 H10))) h2 (sym_eq nat -h2 (S n1) H9))) H8))) n2 (sym_eq nat n2 n0 H6))) h1 (sym_eq nat h1 n1 H5))) -H4)) H3 H1))) | (leq_head a1 a2 H1 a3 a4 H2) \Rightarrow (\lambda (H3: (eq A -(AHead a1 a3) (ASort n1 n0))).(\lambda (H4: (eq A (AHead a2 a4) (ASort (S n1) -n0))).((let H5 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ -_) \Rightarrow True])) I (ASort n1 n0) H3) in (False_ind ((eq A (AHead a2 a4) -(ASort (S n1) n0)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to P))) H5)) H4 H1 -H2)))]) in (H1 (refl_equal A (ASort n1 n0)) (refl_equal A (ASort (S n1) -n0))))))) n H))))) (\lambda (a0: A).(\lambda (_: (((leq g (asucc g a0) a0) -\to (\forall (P: Prop).P)))).(\lambda (a1: A).(\lambda (H0: (((leq g (asucc g -a1) a1) \to (\forall (P: Prop).P)))).(\lambda (H1: (leq g (AHead a0 (asucc g -a1)) (AHead a0 a1))).(\lambda (P: Prop).(let H2 \def (match H1 in leq return -(\lambda (a2: A).(\lambda (a3: A).(\lambda (_: (leq ? a2 a3)).((eq A a2 -(AHead a0 (asucc g a1))) \to ((eq A a3 (AHead a0 a1)) \to P))))) with -[(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) -(AHead a0 (asucc g a1)))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a0 -a1))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) -\Rightarrow False])) I (AHead a0 (asucc g a1)) H3) in (False_ind ((eq A -(ASort h2 n2) (AHead a0 a1)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g -(ASort h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head a2 a3 H2 a4 a5 H3) -\Rightarrow (\lambda (H4: (eq A (AHead a2 a4) (AHead a0 (asucc g -a1)))).(\lambda (H5: (eq A (AHead a3 a5) (AHead a0 a1))).((let H6 \def -(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with -[(ASort _ _) \Rightarrow a4 | (AHead _ a6) \Rightarrow a6])) (AHead a2 a4) -(AHead a0 (asucc g a1)) H4) in ((let H7 \def (f_equal A A (\lambda (e: -A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a2 | -(AHead a6 _) \Rightarrow a6])) (AHead a2 a4) (AHead a0 (asucc g a1)) H4) in -(eq_ind A a0 (\lambda (a6: A).((eq A a4 (asucc g a1)) \to ((eq A (AHead a3 -a5) (AHead a0 a1)) \to ((leq g a6 a3) \to ((leq g a4 a5) \to P))))) (\lambda -(H8: (eq A a4 (asucc g a1))).(eq_ind A (asucc g a1) (\lambda (a6: A).((eq A -(AHead a3 a5) (AHead a0 a1)) \to ((leq g a0 a3) \to ((leq g a6 a5) \to P)))) -(\lambda (H9: (eq A (AHead a3 a5) (AHead a0 a1))).(let H10 \def (f_equal A A -(\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a5 | (AHead _ a6) \Rightarrow a6])) (AHead a3 a5) (AHead a0 a1) -H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e in A return -(\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead a6 _) -\Rightarrow a6])) (AHead a3 a5) (AHead a0 a1) H9) in (eq_ind A a0 (\lambda -(a6: A).((eq A a5 a1) \to ((leq g a0 a6) \to ((leq g (asucc g a1) a5) \to -P)))) (\lambda (H12: (eq A a5 a1)).(eq_ind A a1 (\lambda (a6: A).((leq g a0 -a0) \to ((leq g (asucc g a1) a6) \to P))) (\lambda (_: (leq g a0 -a0)).(\lambda (H14: (leq g (asucc g a1) a1)).(H0 H14 P))) a5 (sym_eq A a5 a1 -H12))) a3 (sym_eq A a3 a0 H11))) H10))) a4 (sym_eq A a4 (asucc g a1) H8))) a2 -(sym_eq A a2 a0 H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (AHead a0 -(asucc g a1))) (refl_equal A (AHead a0 a1)))))))))) a)). +[(ASort _ n2) \Rightarrow n2 | (AHead _ _) \Rightarrow n0])) (ASort (S n1) +n0) (ASort x1 x0) H3) in (\lambda (H6: (eq nat (S n1) x1)).(let H7 \def +(eq_ind_r nat x1 (\lambda (n2: nat).(eq A (aplus g (ASort n1 n0) x2) (aplus g +(ASort n2 x0) x2))) H2 (S n1) H6) in (let H8 \def (eq_ind_r nat x0 (\lambda +(n2: nat).(eq A (aplus g (ASort n1 n0) x2) (aplus g (ASort (S n1) n2) x2))) +H7 n0 H5) in (let H9 \def (eq_ind_r A (aplus g (ASort n1 n0) x2) (\lambda +(a0: A).(eq A a0 (aplus g (ASort (S n1) n0) x2))) H8 (aplus g (ASort (S n1) +n0) (S x2)) (aplus_sort_S_S_simpl g n0 n1 x2)) in (let H_y \def (aplus_inj g +(S x2) x2 (ASort (S n1) n0) H9) in (le_Sx_x x2 (eq_ind_r nat x2 (\lambda (n2: +nat).(le n2 x2)) (le_n x2) (S x2) H_y) P))))))) H4))))))) H1)))))) n H))))) +(\lambda (a0: A).(\lambda (_: (((leq g (asucc g a0) a0) \to (\forall (P: +Prop).P)))).(\lambda (a1: A).(\lambda (H0: (((leq g (asucc g a1) a1) \to +(\forall (P: Prop).P)))).(\lambda (H1: (leq g (AHead a0 (asucc g a1)) (AHead +a0 a1))).(\lambda (P: Prop).(let H_x \def (leq_gen_head1 g a0 (asucc g a1) +(AHead a0 a1) H1) in (let H2 \def H_x in (ex3_2_ind A A (\lambda (a3: +A).(\lambda (_: A).(leq g a0 a3))) (\lambda (_: A).(\lambda (a4: A).(leq g +(asucc g a1) a4))) (\lambda (a3: A).(\lambda (a4: A).(eq A (AHead a0 a1) +(AHead a3 a4)))) P (\lambda (x0: A).(\lambda (x1: A).(\lambda (H3: (leq g a0 +x0)).(\lambda (H4: (leq g (asucc g a1) x1)).(\lambda (H5: (eq A (AHead a0 a1) +(AHead x0 x1))).(let H6 \def (f_equal A A (\lambda (e: A).(match e in A +return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead a2 _) +\Rightarrow a2])) (AHead a0 a1) (AHead x0 x1) H5) in ((let H7 \def (f_equal A +A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) +\Rightarrow a1 | (AHead _ a2) \Rightarrow a2])) (AHead a0 a1) (AHead x0 x1) +H5) in (\lambda (H8: (eq A a0 x0)).(let H9 \def (eq_ind_r A x1 (\lambda (a2: +A).(leq g (asucc g a1) a2)) H4 a1 H7) in (let H10 \def (eq_ind_r A x0 +(\lambda (a2: A).(leq g a0 a2)) H3 a0 H8) in (H0 H9 P))))) H6))))))) +H2))))))))) a)). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/fwd.ma index 03c6edd3a..ddfce504d 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/fwd.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/fwd.ma @@ -16,101 +16,217 @@ include "LambdaDelta-1/leq/defs.ma". -theorem leq_gen_sort: +theorem leq_gen_sort1: \forall (g: G).(\forall (h1: nat).(\forall (n1: nat).(\forall (a2: A).((leq g (ASort h1 n1) a2) \to (ex2_3 nat nat nat (\lambda (n2: nat).(\lambda (h2: -nat).(\lambda (_: nat).(eq A a2 (ASort h2 n2))))) (\lambda (n2: nat).(\lambda -(h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort h1 n1) k) (aplus g (ASort -h2 n2) k)))))))))) +nat).(\lambda (k: nat).(eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) +k))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A a2 +(ASort h2 n2)))))))))) \def \lambda (g: G).(\lambda (h1: nat).(\lambda (n1: nat).(\lambda (a2: -A).(\lambda (H: (leq g (ASort h1 n1) a2)).(let H0 \def (match H in leq return -(\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort -h1 n1)) \to ((eq A a0 a2) \to (ex2_3 nat nat nat (\lambda (n2: nat).(\lambda -(h2: nat).(\lambda (_: nat).(eq A a2 (ASort h2 n2))))) (\lambda (n2: -nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort h1 n1) k) -(aplus g (ASort h2 n2) k))))))))))) with [(leq_sort h0 h2 n0 n2 k H0) -\Rightarrow (\lambda (H1: (eq A (ASort h0 n0) (ASort h1 n1))).(\lambda (H2: -(eq A (ASort h2 n2) a2)).((let H3 \def (f_equal A nat (\lambda (e: A).(match -e in A return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ -_) \Rightarrow n0])) (ASort h0 n0) (ASort h1 n1) H1) in ((let H4 \def -(f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h0])) (ASort h0 n0) -(ASort h1 n1) H1) in (eq_ind nat h1 (\lambda (n: nat).((eq nat n0 n1) \to -((eq A (ASort h2 n2) a2) \to ((eq A (aplus g (ASort n n0) k) (aplus g (ASort -h2 n2) k)) \to (ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: -nat).(\lambda (_: nat).(eq A a2 (ASort h3 n3))))) (\lambda (n3: nat).(\lambda -(h3: nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort -h3 n3) k0)))))))))) (\lambda (H5: (eq nat n0 n1)).(eq_ind nat n1 (\lambda (n: -nat).((eq A (ASort h2 n2) a2) \to ((eq A (aplus g (ASort h1 n) k) (aplus g -(ASort h2 n2) k)) \to (ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: -nat).(\lambda (_: nat).(eq A a2 (ASort h3 n3))))) (\lambda (n3: nat).(\lambda -(h3: nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort -h3 n3) k0))))))))) (\lambda (H6: (eq A (ASort h2 n2) a2)).(eq_ind A (ASort h2 -n2) (\lambda (a: A).((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) -k)) \to (ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: -nat).(eq A a (ASort h3 n3))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda -(k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h3 n3) k0)))))))) -(\lambda (H7: (eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) -k))).(ex2_3_intro nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda -(_: nat).(eq A (ASort h2 n2) (ASort h3 n3))))) (\lambda (n3: nat).(\lambda -(h3: nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort -h3 n3) k0))))) n2 h2 k (refl_equal A (ASort h2 n2)) H7)) a2 H6)) n0 (sym_eq -nat n0 n1 H5))) h0 (sym_eq nat h0 h1 H4))) H3)) H2 H0))) | (leq_head a1 a0 H0 -a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort h1 -n1))).(\lambda (H3: (eq A (AHead a0 a4) a2)).((let H4 \def (eq_ind A (AHead -a1 a3) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with -[(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort h1 -n1) H2) in (False_ind ((eq A (AHead a0 a4) a2) \to ((leq g a1 a0) \to ((leq g -a3 a4) \to (ex2_3 nat nat nat (\lambda (n2: nat).(\lambda (h2: nat).(\lambda -(_: nat).(eq A a2 (ASort h2 n2))))) (\lambda (n2: nat).(\lambda (h2: -nat).(\lambda (k: nat).(eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) -k))))))))) H4)) H3 H0 H1)))]) in (H0 (refl_equal A (ASort h1 n1)) (refl_equal -A a2))))))). +A).(\lambda (H: (leq g (ASort h1 n1) a2)).(insert_eq A (ASort h1 n1) (\lambda +(a: A).(leq g a a2)) (\lambda (a: A).(ex2_3 nat nat nat (\lambda (n2: +nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g a k) (aplus g (ASort +h2 n2) k))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A +a2 (ASort h2 n2))))))) (\lambda (y: A).(\lambda (H0: (leq g y a2)).(leq_ind g +(\lambda (a: A).(\lambda (a0: A).((eq A a (ASort h1 n1)) \to (ex2_3 nat nat +nat (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g a +k) (aplus g (ASort h2 n2) k))))) (\lambda (n2: nat).(\lambda (h2: +nat).(\lambda (_: nat).(eq A a0 (ASort h2 n2))))))))) (\lambda (h0: +nat).(\lambda (h2: nat).(\lambda (n0: nat).(\lambda (n2: nat).(\lambda (k: +nat).(\lambda (H1: (eq A (aplus g (ASort h0 n0) k) (aplus g (ASort h2 n2) +k))).(\lambda (H2: (eq A (ASort h0 n0) (ASort h1 n1))).(let H3 \def (f_equal +A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort +n _) \Rightarrow n | (AHead _ _) \Rightarrow h0])) (ASort h0 n0) (ASort h1 +n1) H2) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e in A return +(\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) +\Rightarrow n0])) (ASort h0 n0) (ASort h1 n1) H2) in (\lambda (H5: (eq nat h0 +h1)).(let H6 \def (eq_ind nat n0 (\lambda (n: nat).(eq A (aplus g (ASort h0 +n) k) (aplus g (ASort h2 n2) k))) H1 n1 H4) in (eq_ind_r nat n1 (\lambda (n: +nat).(ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (k0: +nat).(eq A (aplus g (ASort h0 n) k0) (aplus g (ASort h3 n3) k0))))) (\lambda +(n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A (ASort h2 n2) (ASort h3 +n3))))))) (let H7 \def (eq_ind nat h0 (\lambda (n: nat).(eq A (aplus g (ASort +n n1) k) (aplus g (ASort h2 n2) k))) H6 h1 H5) in (eq_ind_r nat h1 (\lambda +(n: nat).(ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda +(k0: nat).(eq A (aplus g (ASort n n1) k0) (aplus g (ASort h3 n3) k0))))) +(\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A (ASort h2 n2) +(ASort h3 n3))))))) (ex2_3_intro nat nat nat (\lambda (n3: nat).(\lambda (h3: +nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h3 +n3) k0))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A +(ASort h2 n2) (ASort h3 n3))))) n2 h2 k H7 (refl_equal A (ASort h2 n2))) h0 +H5)) n0 H4)))) H3))))))))) (\lambda (a1: A).(\lambda (a3: A).(\lambda (_: +(leq g a1 a3)).(\lambda (_: (((eq A a1 (ASort h1 n1)) \to (ex2_3 nat nat nat +(\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g a1 k) +(aplus g (ASort h2 n2) k))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda +(_: nat).(eq A a3 (ASort h2 n2))))))))).(\lambda (a4: A).(\lambda (a5: +A).(\lambda (_: (leq g a4 a5)).(\lambda (_: (((eq A a4 (ASort h1 n1)) \to +(ex2_3 nat nat nat (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: +nat).(eq A (aplus g a4 k) (aplus g (ASort h2 n2) k))))) (\lambda (n2: +nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A a5 (ASort h2 +n2))))))))).(\lambda (H5: (eq A (AHead a1 a4) (ASort h1 n1))).(let H6 \def +(eq_ind A (AHead a1 a4) (\lambda (ee: A).(match ee in A return (\lambda (_: +A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow +True])) I (ASort h1 n1) H5) in (False_ind (ex2_3 nat nat nat (\lambda (n2: +nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (AHead a1 a4) k) +(aplus g (ASort h2 n2) k))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda +(_: nat).(eq A (AHead a3 a5) (ASort h2 n2)))))) H6))))))))))) y a2 H0))) +H))))). -theorem leq_gen_head: +theorem leq_gen_head1: \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (a: A).((leq g -(AHead a1 a2) a) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a -(AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(leq g a1 a3))) (\lambda -(_: A).(\lambda (a4: A).(leq g a2 a4)))))))) +(AHead a1 a2) a) \to (ex3_2 A A (\lambda (a3: A).(\lambda (_: A).(leq g a1 +a3))) (\lambda (_: A).(\lambda (a4: A).(leq g a2 a4))) (\lambda (a3: +A).(\lambda (a4: A).(eq A a (AHead a3 a4))))))))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (a: A).(\lambda +(H: (leq g (AHead a1 a2) a)).(insert_eq A (AHead a1 a2) (\lambda (a0: A).(leq +g a0 a)) (\lambda (_: A).(ex3_2 A A (\lambda (a3: A).(\lambda (_: A).(leq g +a1 a3))) (\lambda (_: A).(\lambda (a4: A).(leq g a2 a4))) (\lambda (a3: +A).(\lambda (a4: A).(eq A a (AHead a3 a4)))))) (\lambda (y: A).(\lambda (H0: +(leq g y a)).(leq_ind g (\lambda (a0: A).(\lambda (a3: A).((eq A a0 (AHead a1 +a2)) \to (ex3_2 A A (\lambda (a4: A).(\lambda (_: A).(leq g a1 a4))) (\lambda +(_: A).(\lambda (a5: A).(leq g a2 a5))) (\lambda (a4: A).(\lambda (a5: A).(eq +A a3 (AHead a4 a5)))))))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: +nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (_: (eq A (aplus g (ASort +h1 n1) k) (aplus g (ASort h2 n2) k))).(\lambda (H2: (eq A (ASort h1 n1) +(AHead a1 a2))).(let H3 \def (eq_ind A (ASort h1 n1) (\lambda (ee: A).(match +ee in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | +(AHead _ _) \Rightarrow False])) I (AHead a1 a2) H2) in (False_ind (ex3_2 A A +(\lambda (a3: A).(\lambda (_: A).(leq g a1 a3))) (\lambda (_: A).(\lambda +(a4: A).(leq g a2 a4))) (\lambda (a3: A).(\lambda (a4: A).(eq A (ASort h2 n2) +(AHead a3 a4))))) H3))))))))) (\lambda (a0: A).(\lambda (a3: A).(\lambda (H1: +(leq g a0 a3)).(\lambda (H2: (((eq A a0 (AHead a1 a2)) \to (ex3_2 A A +(\lambda (a4: A).(\lambda (_: A).(leq g a1 a4))) (\lambda (_: A).(\lambda +(a5: A).(leq g a2 a5))) (\lambda (a4: A).(\lambda (a5: A).(eq A a3 (AHead a4 +a5)))))))).(\lambda (a4: A).(\lambda (a5: A).(\lambda (H3: (leq g a4 +a5)).(\lambda (H4: (((eq A a4 (AHead a1 a2)) \to (ex3_2 A A (\lambda (a6: +A).(\lambda (_: A).(leq g a1 a6))) (\lambda (_: A).(\lambda (a7: A).(leq g a2 +a7))) (\lambda (a6: A).(\lambda (a7: A).(eq A a5 (AHead a6 +a7)))))))).(\lambda (H5: (eq A (AHead a0 a4) (AHead a1 a2))).(let H6 \def +(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with +[(ASort _ _) \Rightarrow a0 | (AHead a6 _) \Rightarrow a6])) (AHead a0 a4) +(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 a4 | (AHead _ a6) +\Rightarrow a6])) (AHead a0 a4) (AHead a1 a2) H5) in (\lambda (H8: (eq A a0 +a1)).(let H9 \def (eq_ind A a4 (\lambda (a6: A).((eq A a6 (AHead a1 a2)) \to +(ex3_2 A A (\lambda (a7: A).(\lambda (_: A).(leq g a1 a7))) (\lambda (_: +A).(\lambda (a8: A).(leq g a2 a8))) (\lambda (a7: A).(\lambda (a8: A).(eq A +a5 (AHead a7 a8))))))) H4 a2 H7) in (let H10 \def (eq_ind A a4 (\lambda (a6: +A).(leq g a6 a5)) H3 a2 H7) in (let H11 \def (eq_ind A a0 (\lambda (a6: +A).((eq A a6 (AHead a1 a2)) \to (ex3_2 A A (\lambda (a7: A).(\lambda (_: +A).(leq g a1 a7))) (\lambda (_: A).(\lambda (a8: A).(leq g a2 a8))) (\lambda +(a7: A).(\lambda (a8: A).(eq A a3 (AHead a7 a8))))))) H2 a1 H8) in (let H12 +\def (eq_ind A a0 (\lambda (a6: A).(leq g a6 a3)) H1 a1 H8) in (ex3_2_intro A +A (\lambda (a6: A).(\lambda (_: A).(leq g a1 a6))) (\lambda (_: A).(\lambda +(a7: A).(leq g a2 a7))) (\lambda (a6: A).(\lambda (a7: A).(eq A (AHead a3 a5) +(AHead a6 a7)))) a3 a5 H12 H10 (refl_equal A (AHead a3 a5))))))))) +H6))))))))))) y a H0))) H))))). + +theorem leq_gen_sort2: + \forall (g: G).(\forall (h1: nat).(\forall (n1: nat).(\forall (a2: A).((leq +g a2 (ASort h1 n1)) \to (ex2_3 nat nat nat (\lambda (n2: nat).(\lambda (h2: +nat).(\lambda (k: nat).(eq A (aplus g (ASort h2 n2) k) (aplus g (ASort h1 n1) +k))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A a2 +(ASort h2 n2)))))))))) +\def + \lambda (g: G).(\lambda (h1: nat).(\lambda (n1: nat).(\lambda (a2: +A).(\lambda (H: (leq g a2 (ASort h1 n1))).(insert_eq A (ASort h1 n1) (\lambda +(a: A).(leq g a2 a)) (\lambda (a: A).(ex2_3 nat nat nat (\lambda (n2: +nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort h2 n2) k) +(aplus g a k))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (_: nat).(eq +A a2 (ASort h2 n2))))))) (\lambda (y: A).(\lambda (H0: (leq g a2 y)).(leq_ind +g (\lambda (a: A).(\lambda (a0: A).((eq A a0 (ASort h1 n1)) \to (ex2_3 nat +nat nat (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus +g (ASort h2 n2) k) (aplus g a0 k))))) (\lambda (n2: nat).(\lambda (h2: +nat).(\lambda (_: nat).(eq A a (ASort h2 n2))))))))) (\lambda (h0: +nat).(\lambda (h2: nat).(\lambda (n0: nat).(\lambda (n2: nat).(\lambda (k: +nat).(\lambda (H1: (eq A (aplus g (ASort h0 n0) k) (aplus g (ASort h2 n2) +k))).(\lambda (H2: (eq A (ASort h2 n2) (ASort h1 n1))).(let H3 \def (f_equal +A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort +n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n2) (ASort h1 +n1) H2) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e in A return +(\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) +\Rightarrow n2])) (ASort h2 n2) (ASort h1 n1) H2) in (\lambda (H5: (eq nat h2 +h1)).(let H6 \def (eq_ind nat n2 (\lambda (n: nat).(eq A (aplus g (ASort h0 +n0) k) (aplus g (ASort h2 n) k))) H1 n1 H4) in (eq_ind_r nat n1 (\lambda (n: +nat).(ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (k0: +nat).(eq A (aplus g (ASort h3 n3) k0) (aplus g (ASort h2 n) k0))))) (\lambda +(n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A (ASort h0 n0) (ASort h3 +n3))))))) (let H7 \def (eq_ind nat h2 (\lambda (n: nat).(eq A (aplus g (ASort +h0 n0) k) (aplus g (ASort n n1) k))) H6 h1 H5) in (eq_ind_r nat h1 (\lambda +(n: nat).(ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda +(k0: nat).(eq A (aplus g (ASort h3 n3) k0) (aplus g (ASort n n1) k0))))) +(\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A (ASort h0 n0) +(ASort h3 n3))))))) (ex2_3_intro nat nat nat (\lambda (n3: nat).(\lambda (h3: +nat).(\lambda (k0: nat).(eq A (aplus g (ASort h3 n3) k0) (aplus g (ASort h1 +n1) k0))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A +(ASort h0 n0) (ASort h3 n3))))) n0 h0 k H7 (refl_equal A (ASort h0 n0))) h2 +H5)) n2 H4)))) H3))))))))) (\lambda (a1: A).(\lambda (a3: A).(\lambda (_: +(leq g a1 a3)).(\lambda (_: (((eq A a3 (ASort h1 n1)) \to (ex2_3 nat nat nat +(\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort +h2 n2) k) (aplus g a3 k))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda +(_: nat).(eq A a1 (ASort h2 n2))))))))).(\lambda (a4: A).(\lambda (a5: +A).(\lambda (_: (leq g a4 a5)).(\lambda (_: (((eq A a5 (ASort h1 n1)) \to +(ex2_3 nat nat nat (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: +nat).(eq A (aplus g (ASort h2 n2) k) (aplus g a5 k))))) (\lambda (n2: +nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A a4 (ASort h2 +n2))))))))).(\lambda (H5: (eq A (AHead a3 a5) (ASort h1 n1))).(let H6 \def +(eq_ind A (AHead a3 a5) (\lambda (ee: A).(match ee in A return (\lambda (_: +A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow +True])) I (ASort h1 n1) H5) in (False_ind (ex2_3 nat nat nat (\lambda (n2: +nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort h2 n2) k) +(aplus g (AHead a3 a5) k))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda +(_: nat).(eq A (AHead a1 a4) (ASort h2 n2)))))) H6))))))))))) a2 y H0))) +H))))). + +theorem leq_gen_head2: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (a: A).((leq g a +(AHead a1 a2)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (_: A).(leq g a3 +a1))) (\lambda (_: A).(\lambda (a4: A).(leq g a4 a2))) (\lambda (a3: +A).(\lambda (a4: A).(eq A a (AHead a3 a4))))))))) \def \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (a: A).(\lambda -(H: (leq g (AHead a1 a2) a)).(let H0 \def (match H in leq return (\lambda -(a0: A).(\lambda (a3: A).(\lambda (_: (leq ? a0 a3)).((eq A a0 (AHead a1 a2)) -\to ((eq A a3 a) \to (ex3_2 A A (\lambda (a4: A).(\lambda (a5: A).(eq A a -(AHead a4 a5)))) (\lambda (a4: A).(\lambda (_: A).(leq g a1 a4))) (\lambda -(_: A).(\lambda (a5: A).(leq g a2 a5))))))))) with [(leq_sort h1 h2 n1 n2 k -H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead a1 a2))).(\lambda -(H2: (eq A (ASort h2 n2) a)).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda -(e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) -\Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a1 a2) H1) in -(False_ind ((eq A (ASort h2 n2) a) \to ((eq A (aplus g (ASort h1 n1) k) -(aplus g (ASort h2 n2) k)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: -A).(eq A a (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(leq g a1 a3))) -(\lambda (_: A).(\lambda (a4: A).(leq g a2 a4)))))) H3)) H2 H0))) | (leq_head -a0 a3 H0 a4 a5 H1) \Rightarrow (\lambda (H2: (eq A (AHead a0 a4) (AHead a1 -a2))).(\lambda (H3: (eq A (AHead a3 a5) a)).((let H4 \def (f_equal A A -(\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a4 | (AHead _ a6) \Rightarrow a6])) (AHead a0 a4) (AHead a1 a2) -H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e in A return -(\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead a6 _) -\Rightarrow a6])) (AHead a0 a4) (AHead a1 a2) H2) in (eq_ind A a1 (\lambda -(a6: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) a) \to ((leq g a6 a3) \to -((leq g a4 a5) \to (ex3_2 A A (\lambda (a7: A).(\lambda (a8: A).(eq A a -(AHead a7 a8)))) (\lambda (a7: A).(\lambda (_: A).(leq g a1 a7))) (\lambda -(_: A).(\lambda (a8: A).(leq g a2 a8))))))))) (\lambda (H6: (eq A a4 -a2)).(eq_ind A a2 (\lambda (a6: A).((eq A (AHead a3 a5) a) \to ((leq g a1 a3) -\to ((leq g a6 a5) \to (ex3_2 A A (\lambda (a7: A).(\lambda (a8: A).(eq A a -(AHead a7 a8)))) (\lambda (a7: A).(\lambda (_: A).(leq g a1 a7))) (\lambda -(_: A).(\lambda (a8: A).(leq g a2 a8)))))))) (\lambda (H7: (eq A (AHead a3 -a5) a)).(eq_ind A (AHead a3 a5) (\lambda (a6: A).((leq g a1 a3) \to ((leq g -a2 a5) \to (ex3_2 A A (\lambda (a7: A).(\lambda (a8: A).(eq A a6 (AHead a7 -a8)))) (\lambda (a7: A).(\lambda (_: A).(leq g a1 a7))) (\lambda (_: -A).(\lambda (a8: A).(leq g a2 a8))))))) (\lambda (H8: (leq g a1 a3)).(\lambda -(H9: (leq g a2 a5)).(ex3_2_intro A A (\lambda (a6: A).(\lambda (a7: A).(eq A -(AHead a3 a5) (AHead a6 a7)))) (\lambda (a6: A).(\lambda (_: A).(leq g a1 -a6))) (\lambda (_: A).(\lambda (a7: A).(leq g a2 a7))) a3 a5 (refl_equal A -(AHead a3 a5)) H8 H9))) a H7)) a4 (sym_eq A a4 a2 H6))) a0 (sym_eq A a0 a1 -H5))) H4)) H3 H0 H1)))]) in (H0 (refl_equal A (AHead a1 a2)) (refl_equal A -a))))))). +(H: (leq g a (AHead a1 a2))).(insert_eq A (AHead a1 a2) (\lambda (a0: A).(leq +g a a0)) (\lambda (_: A).(ex3_2 A A (\lambda (a3: A).(\lambda (_: A).(leq g +a3 a1))) (\lambda (_: A).(\lambda (a4: A).(leq g a4 a2))) (\lambda (a3: +A).(\lambda (a4: A).(eq A a (AHead a3 a4)))))) (\lambda (y: A).(\lambda (H0: +(leq g a y)).(leq_ind g (\lambda (a0: A).(\lambda (a3: A).((eq A a3 (AHead a1 +a2)) \to (ex3_2 A A (\lambda (a4: A).(\lambda (_: A).(leq g a4 a1))) (\lambda +(_: A).(\lambda (a5: A).(leq g a5 a2))) (\lambda (a4: A).(\lambda (a5: A).(eq +A a0 (AHead a4 a5)))))))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: +nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (_: (eq A (aplus g (ASort +h1 n1) k) (aplus g (ASort h2 n2) k))).(\lambda (H2: (eq A (ASort h2 n2) +(AHead a1 a2))).(let H3 \def (eq_ind A (ASort h2 n2) (\lambda (ee: A).(match +ee in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | +(AHead _ _) \Rightarrow False])) I (AHead a1 a2) H2) in (False_ind (ex3_2 A A +(\lambda (a3: A).(\lambda (_: A).(leq g a3 a1))) (\lambda (_: A).(\lambda +(a4: A).(leq g a4 a2))) (\lambda (a3: A).(\lambda (a4: A).(eq A (ASort h1 n1) +(AHead a3 a4))))) H3))))))))) (\lambda (a0: A).(\lambda (a3: A).(\lambda (H1: +(leq g a0 a3)).(\lambda (H2: (((eq A a3 (AHead a1 a2)) \to (ex3_2 A A +(\lambda (a4: A).(\lambda (_: A).(leq g a4 a1))) (\lambda (_: A).(\lambda +(a5: A).(leq g a5 a2))) (\lambda (a4: A).(\lambda (a5: A).(eq A a0 (AHead a4 +a5)))))))).(\lambda (a4: A).(\lambda (a5: A).(\lambda (H3: (leq g a4 +a5)).(\lambda (H4: (((eq A a5 (AHead a1 a2)) \to (ex3_2 A A (\lambda (a6: +A).(\lambda (_: A).(leq g a6 a1))) (\lambda (_: A).(\lambda (a7: A).(leq g a7 +a2))) (\lambda (a6: A).(\lambda (a7: A).(eq A a4 (AHead a6 +a7)))))))).(\lambda (H5: (eq A (AHead a3 a5) (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 a6 _) \Rightarrow a6])) (AHead a3 a5) +(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 a5 | (AHead _ a6) +\Rightarrow a6])) (AHead a3 a5) (AHead a1 a2) H5) in (\lambda (H8: (eq A a3 +a1)).(let H9 \def (eq_ind A a5 (\lambda (a6: A).((eq A a6 (AHead a1 a2)) \to +(ex3_2 A A (\lambda (a7: A).(\lambda (_: A).(leq g a7 a1))) (\lambda (_: +A).(\lambda (a8: A).(leq g a8 a2))) (\lambda (a7: A).(\lambda (a8: A).(eq A +a4 (AHead a7 a8))))))) H4 a2 H7) in (let H10 \def (eq_ind A a5 (\lambda (a6: +A).(leq g a4 a6)) H3 a2 H7) in (let H11 \def (eq_ind A a3 (\lambda (a6: +A).((eq A a6 (AHead a1 a2)) \to (ex3_2 A A (\lambda (a7: A).(\lambda (_: +A).(leq g a7 a1))) (\lambda (_: A).(\lambda (a8: A).(leq g a8 a2))) (\lambda +(a7: A).(\lambda (a8: A).(eq A a0 (AHead a7 a8))))))) H2 a1 H8) in (let H12 +\def (eq_ind A a3 (\lambda (a6: A).(leq g a0 a6)) H1 a1 H8) in (ex3_2_intro A +A (\lambda (a6: A).(\lambda (_: A).(leq g a6 a1))) (\lambda (_: A).(\lambda +(a7: A).(leq g a7 a2))) (\lambda (a6: A).(\lambda (a7: A).(eq A (AHead a0 a4) +(AHead a6 a7)))) a0 a4 H12 H10 (refl_equal A (AHead a0 a4))))))))) +H6))))))))))) a y H0))) H))))). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/props.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/props.ma index 3e5717ef7..e1a1510be 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/props.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/leq/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "LambdaDelta-1/leq/defs.ma". +include "LambdaDelta-1/leq/fwd.ma". include "LambdaDelta-1/aplus/props.ma". @@ -23,38 +23,20 @@ theorem ahead_inj_snd: (a4: A).((leq g (AHead a1 a2) (AHead a3 a4)) \to (leq g a2 a4)))))) \def \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (a3: A).(\lambda -(a4: A).(\lambda (H: (leq g (AHead a1 a2) (AHead a3 a4))).(let H0 \def (match -H in leq return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a -a0)).((eq A a (AHead a1 a2)) \to ((eq A a0 (AHead a3 a4)) \to (leq g a2 -a4)))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A -(ASort h1 n1) (AHead a1 a2))).(\lambda (H2: (eq A (ASort h2 n2) (AHead a3 -a4))).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) -\Rightarrow False])) I (AHead a1 a2) H1) in (False_ind ((eq A (ASort h2 n2) -(AHead a3 a4)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) -k)) \to (leq g a2 a4))) H3)) H2 H0))) | (leq_head a0 a5 H0 a6 a7 H1) -\Rightarrow (\lambda (H2: (eq A (AHead a0 a6) (AHead a1 a2))).(\lambda (H3: -(eq A (AHead a5 a7) (AHead a3 a4))).((let H4 \def (f_equal A A (\lambda (e: -A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a6 | -(AHead _ a) \Rightarrow a])) (AHead a0 a6) (AHead a1 a2) H2) in ((let H5 \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 a6) -(AHead a1 a2) H2) in (eq_ind A a1 (\lambda (a: A).((eq A a6 a2) \to ((eq A -(AHead a5 a7) (AHead a3 a4)) \to ((leq g a a5) \to ((leq g a6 a7) \to (leq g -a2 a4)))))) (\lambda (H6: (eq A a6 a2)).(eq_ind A a2 (\lambda (a: A).((eq A -(AHead a5 a7) (AHead a3 a4)) \to ((leq g a1 a5) \to ((leq g a a7) \to (leq g -a2 a4))))) (\lambda (H7: (eq A (AHead a5 a7) (AHead a3 a4))).(let H8 \def -(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with -[(ASort _ _) \Rightarrow a7 | (AHead _ a) \Rightarrow a])) (AHead a5 a7) -(AHead a3 a4) H7) in ((let H9 \def (f_equal A A (\lambda (e: A).(match e in A -return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a5 | (AHead a _) -\Rightarrow a])) (AHead a5 a7) (AHead a3 a4) H7) in (eq_ind A a3 (\lambda (a: -A).((eq A a7 a4) \to ((leq g a1 a) \to ((leq g a2 a7) \to (leq g a2 a4))))) -(\lambda (H10: (eq A a7 a4)).(eq_ind A a4 (\lambda (a: A).((leq g a1 a3) \to -((leq g a2 a) \to (leq g a2 a4)))) (\lambda (_: (leq g a1 a3)).(\lambda (H12: -(leq g a2 a4)).H12)) a7 (sym_eq A a7 a4 H10))) a5 (sym_eq A a5 a3 H9))) H8))) -a6 (sym_eq A a6 a2 H6))) a0 (sym_eq A a0 a1 H5))) H4)) H3 H0 H1)))]) in (H0 -(refl_equal A (AHead a1 a2)) (refl_equal A (AHead a3 a4))))))))). +(a4: A).(\lambda (H: (leq g (AHead a1 a2) (AHead a3 a4))).(let H_x \def +(leq_gen_head1 g a1 a2 (AHead a3 a4) H) in (let H0 \def H_x in (ex3_2_ind A A +(\lambda (a5: A).(\lambda (_: A).(leq g a1 a5))) (\lambda (_: A).(\lambda +(a6: A).(leq g a2 a6))) (\lambda (a5: A).(\lambda (a6: A).(eq A (AHead a3 a4) +(AHead a5 a6)))) (leq g a2 a4) (\lambda (x0: A).(\lambda (x1: A).(\lambda +(H1: (leq g a1 x0)).(\lambda (H2: (leq g a2 x1)).(\lambda (H3: (eq A (AHead +a3 a4) (AHead x0 x1))).(let H4 \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 a3 a4) (AHead x0 x1) H3) in ((let H5 \def (f_equal A +A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) +\Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a3 a4) (AHead x0 x1) H3) +in (\lambda (H6: (eq A a3 x0)).(let H7 \def (eq_ind_r A x1 (\lambda (a: +A).(leq g a2 a)) H2 a4 H5) in (let H8 \def (eq_ind_r A x0 (\lambda (a: +A).(leq g a1 a)) H1 a3 H6) in H7)))) H4))))))) H0)))))))). theorem leq_refl: \forall (g: G).(\forall (a: A).(leq g a a)) @@ -70,7 +52,7 @@ theorem leq_eq: a2)))) \def \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (eq A a1 -a2)).(eq_ind_r A a2 (\lambda (a: A).(leq g a a2)) (leq_refl g a2) a1 H)))). +a2)).(eq_ind A a1 (\lambda (a: A).(leq g a1 a)) (leq_refl g a1) a2 H)))). theorem leq_sym: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (leq g @@ -95,73 +77,40 @@ a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(\forall (a3: A).((leq g a0 a3) \to (leq g a a3))))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (H0: (eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))).(\lambda (a3: A).(\lambda (H1: (leq g -(ASort h2 n2) a3)).(let H2 \def (match H1 in leq return (\lambda (a: -A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort h2 n2)) \to -((eq A a0 a3) \to (leq g (ASort h1 n1) a3)))))) with [(leq_sort h0 h3 n0 n3 -k0 H2) \Rightarrow (\lambda (H3: (eq A (ASort h0 n0) (ASort h2 n2))).(\lambda -(H4: (eq A (ASort h3 n3) a3)).((let H5 \def (f_equal A nat (\lambda (e: -A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n -| (AHead _ _) \Rightarrow n0])) (ASort h0 n0) (ASort h2 n2) H3) in ((let H6 -\def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) -with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h0])) (ASort h0 n0) -(ASort h2 n2) H3) in (eq_ind nat h2 (\lambda (n: nat).((eq nat n0 n2) \to -((eq A (ASort h3 n3) a3) \to ((eq A (aplus g (ASort n n0) k0) (aplus g (ASort -h3 n3) k0)) \to (leq g (ASort h1 n1) a3))))) (\lambda (H7: (eq nat n0 -n2)).(eq_ind nat n2 (\lambda (n: nat).((eq A (ASort h3 n3) a3) \to ((eq A -(aplus g (ASort h2 n) k0) (aplus g (ASort h3 n3) k0)) \to (leq g (ASort h1 -n1) a3)))) (\lambda (H8: (eq A (ASort h3 n3) a3)).(eq_ind A (ASort h3 n3) -(\lambda (a: A).((eq A (aplus g (ASort h2 n2) k0) (aplus g (ASort h3 n3) k0)) -\to (leq g (ASort h1 n1) a))) (\lambda (H9: (eq A (aplus g (ASort h2 n2) k0) -(aplus g (ASort h3 n3) k0))).(lt_le_e k k0 (leq g (ASort h1 n1) (ASort h3 -n3)) (\lambda (H10: (lt k k0)).(let H_y \def (aplus_reg_r g (ASort h1 n1) -(ASort h2 n2) k k H0 (minus k0 k)) in (let H11 \def (eq_ind_r nat (plus -(minus k0 k) k) (\lambda (n: nat).(eq A (aplus g (ASort h1 n1) n) (aplus g -(ASort h2 n2) n))) H_y k0 (le_plus_minus_sym k k0 (le_trans k (S k) k0 (le_S -k k (le_n k)) H10))) in (leq_sort g h1 h3 n1 n3 k0 (trans_eq A (aplus g -(ASort h1 n1) k0) (aplus g (ASort h2 n2) k0) (aplus g (ASort h3 n3) k0) H11 -H9))))) (\lambda (H10: (le k0 k)).(let H_y \def (aplus_reg_r g (ASort h2 n2) -(ASort h3 n3) k0 k0 H9 (minus k k0)) in (let H11 \def (eq_ind_r nat (plus -(minus k k0) k0) (\lambda (n: nat).(eq A (aplus g (ASort h2 n2) n) (aplus g -(ASort h3 n3) n))) H_y k (le_plus_minus_sym k0 k H10)) in (leq_sort g h1 h3 -n1 n3 k (trans_eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k) -(aplus g (ASort h3 n3) k) H0 H11))))))) a3 H8)) n0 (sym_eq nat n0 n2 H7))) h0 -(sym_eq nat h0 h2 H6))) H5)) H4 H2))) | (leq_head a0 a4 H2 a5 a6 H3) -\Rightarrow (\lambda (H4: (eq A (AHead a0 a5) (ASort h2 n2))).(\lambda (H5: -(eq A (AHead a4 a6) a3)).((let H6 \def (eq_ind A (AHead a0 a5) (\lambda (e: -A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow -False | (AHead _ _) \Rightarrow True])) I (ASort h2 n2) H4) in (False_ind -((eq A (AHead a4 a6) a3) \to ((leq g a0 a4) \to ((leq g a5 a6) \to (leq g -(ASort h1 n1) a3)))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (ASort h2 n2)) -(refl_equal A a3))))))))))) (\lambda (a3: A).(\lambda (a4: A).(\lambda (_: -(leq g a3 a4)).(\lambda (H1: ((\forall (a5: A).((leq g a4 a5) \to (leq g a3 -a5))))).(\lambda (a5: A).(\lambda (a6: A).(\lambda (_: (leq g a5 -a6)).(\lambda (H3: ((\forall (a7: A).((leq g a6 a7) \to (leq g a5 -a7))))).(\lambda (a0: A).(\lambda (H4: (leq g (AHead a4 a6) a0)).(let H5 \def -(match H4 in leq return (\lambda (a: A).(\lambda (a7: A).(\lambda (_: (leq ? -a a7)).((eq A a (AHead a4 a6)) \to ((eq A a7 a0) \to (leq g (AHead a3 a5) -a0)))))) with [(leq_sort h1 h2 n1 n2 k H5) \Rightarrow (\lambda (H6: (eq A -(ASort h1 n1) (AHead a4 a6))).(\lambda (H7: (eq A (ASort h2 n2) a0)).((let H8 -\def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A return (\lambda -(_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow -False])) I (AHead a4 a6) H6) in (False_ind ((eq A (ASort h2 n2) a0) \to ((eq -A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (AHead a3 -a5) a0))) H8)) H7 H5))) | (leq_head a7 a8 H5 a9 a10 H6) \Rightarrow (\lambda -(H7: (eq A (AHead a7 a9) (AHead a4 a6))).(\lambda (H8: (eq A (AHead a8 a10) -a0)).((let H9 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda -(_: A).A) with [(ASort _ _) \Rightarrow a9 | (AHead _ a) \Rightarrow a])) -(AHead a7 a9) (AHead a4 a6) H7) in ((let H10 \def (f_equal A A (\lambda (e: -A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a7 | -(AHead a _) \Rightarrow a])) (AHead a7 a9) (AHead a4 a6) H7) in (eq_ind A a4 -(\lambda (a: A).((eq A a9 a6) \to ((eq A (AHead a8 a10) a0) \to ((leq g a a8) -\to ((leq g a9 a10) \to (leq g (AHead a3 a5) a0)))))) (\lambda (H11: (eq A a9 -a6)).(eq_ind A a6 (\lambda (a: A).((eq A (AHead a8 a10) a0) \to ((leq g a4 -a8) \to ((leq g a a10) \to (leq g (AHead a3 a5) a0))))) (\lambda (H12: (eq A -(AHead a8 a10) a0)).(eq_ind A (AHead a8 a10) (\lambda (a: A).((leq g a4 a8) -\to ((leq g a6 a10) \to (leq g (AHead a3 a5) a)))) (\lambda (H13: (leq g a4 -a8)).(\lambda (H14: (leq g a6 a10)).(leq_head g a3 a8 (H1 a8 H13) a5 a10 (H3 -a10 H14)))) a0 H12)) a9 (sym_eq A a9 a6 H11))) a7 (sym_eq A a7 a4 H10))) H9)) -H8 H5 H6)))]) in (H5 (refl_equal A (AHead a4 a6)) (refl_equal A -a0))))))))))))) a1 a2 H)))). +(ASort h2 n2) a3)).(let H_x \def (leq_gen_sort1 g h2 n2 a3 H1) in (let H2 +\def H_x in (ex2_3_ind nat nat nat (\lambda (n3: nat).(\lambda (h3: +nat).(\lambda (k0: nat).(eq A (aplus g (ASort h2 n2) k0) (aplus g (ASort h3 +n3) k0))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A a3 +(ASort h3 n3))))) (leq g (ASort h1 n1) a3) (\lambda (x0: nat).(\lambda (x1: +nat).(\lambda (x2: nat).(\lambda (H3: (eq A (aplus g (ASort h2 n2) x2) (aplus +g (ASort x1 x0) x2))).(\lambda (H4: (eq A a3 (ASort x1 x0))).(let H5 \def +(f_equal A A (\lambda (e: A).e) a3 (ASort x1 x0) H4) in (eq_ind_r A (ASort x1 +x0) (\lambda (a: A).(leq g (ASort h1 n1) a)) (lt_le_e k x2 (leq g (ASort h1 +n1) (ASort x1 x0)) (\lambda (H6: (lt k x2)).(let H_y \def (aplus_reg_r g +(ASort h1 n1) (ASort h2 n2) k k H0 (minus x2 k)) in (let H7 \def (eq_ind_r +nat (plus (minus x2 k) k) (\lambda (n: nat).(eq A (aplus g (ASort h1 n1) n) +(aplus g (ASort h2 n2) n))) H_y x2 (le_plus_minus_sym k x2 (le_trans k (S k) +x2 (le_S k k (le_n k)) H6))) in (leq_sort g h1 x1 n1 x0 x2 (trans_eq A (aplus +g (ASort h1 n1) x2) (aplus g (ASort h2 n2) x2) (aplus g (ASort x1 x0) x2) H7 +H3))))) (\lambda (H6: (le x2 k)).(let H_y \def (aplus_reg_r g (ASort h2 n2) +(ASort x1 x0) x2 x2 H3 (minus k x2)) in (let H7 \def (eq_ind_r nat (plus +(minus k x2) x2) (\lambda (n: nat).(eq A (aplus g (ASort h2 n2) n) (aplus g +(ASort x1 x0) n))) H_y k (le_plus_minus_sym x2 k H6)) in (leq_sort g h1 x1 n1 +x0 k (trans_eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k) (aplus g +(ASort x1 x0) k) H0 H7)))))) a3 H5))))))) H2))))))))))) (\lambda (a3: +A).(\lambda (a4: A).(\lambda (_: (leq g a3 a4)).(\lambda (H1: ((\forall (a5: +A).((leq g a4 a5) \to (leq g a3 a5))))).(\lambda (a5: A).(\lambda (a6: +A).(\lambda (_: (leq g a5 a6)).(\lambda (H3: ((\forall (a7: A).((leq g a6 a7) +\to (leq g a5 a7))))).(\lambda (a0: A).(\lambda (H4: (leq g (AHead a4 a6) +a0)).(let H_x \def (leq_gen_head1 g a4 a6 a0 H4) in (let H5 \def H_x in +(ex3_2_ind A A (\lambda (a7: A).(\lambda (_: A).(leq g a4 a7))) (\lambda (_: +A).(\lambda (a8: A).(leq g a6 a8))) (\lambda (a7: A).(\lambda (a8: A).(eq A +a0 (AHead a7 a8)))) (leq g (AHead a3 a5) a0) (\lambda (x0: A).(\lambda (x1: +A).(\lambda (H6: (leq g a4 x0)).(\lambda (H7: (leq g a6 x1)).(\lambda (H8: +(eq A a0 (AHead x0 x1))).(let H9 \def (f_equal A A (\lambda (e: A).e) a0 +(AHead x0 x1) H8) in (eq_ind_r A (AHead x0 x1) (\lambda (a: A).(leq g (AHead +a3 a5) a)) (leq_head g a3 x0 (H1 x0 H6) a5 x1 (H3 x1 H7)) a0 H9))))))) +H5))))))))))))) a1 a2 H)))). theorem leq_ahead_false_1: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g (AHead a1 a2) a1) @@ -172,99 +121,45 @@ A).((leq g (AHead a a2) a) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (a2: A).(\lambda (H: (leq g (AHead (ASort n n0) a2) (ASort n n0))).(\lambda (P: Prop).(nat_ind (\lambda (n1: nat).((leq g (AHead (ASort n1 n0) a2) (ASort n1 n0)) \to P)) (\lambda (H0: (leq g (AHead -(ASort O n0) a2) (ASort O n0))).(let H1 \def (match H0 in leq return (\lambda -(a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (AHead (ASort O -n0) a2)) \to ((eq A a0 (ASort O n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k -H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 n1) (AHead (ASort O n0) -a2))).(\lambda (H3: (eq A (ASort h2 n2) (ASort O n0))).((let H4 \def (eq_ind -A (ASort h1 n1) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) -with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I -(AHead (ASort O n0) a2) H2) in (False_ind ((eq A (ASort h2 n2) (ASort O n0)) -\to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H4)) -H3 H1))) | (leq_head a0 a3 H1 a4 a5 H2) \Rightarrow (\lambda (H3: (eq A -(AHead a0 a4) (AHead (ASort O n0) a2))).(\lambda (H4: (eq A (AHead a3 a5) -(ASort O n0))).((let H5 \def (f_equal A A (\lambda (e: A).(match e in A -return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) -\Rightarrow a])) (AHead a0 a4) (AHead (ASort O n0) a2) H3) in ((let H6 \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 a4) -(AHead (ASort O n0) a2) H3) in (eq_ind A (ASort O n0) (\lambda (a: A).((eq A -a4 a2) \to ((eq A (AHead a3 a5) (ASort O n0)) \to ((leq g a a3) \to ((leq g -a4 a5) \to P))))) (\lambda (H7: (eq A a4 a2)).(eq_ind A a2 (\lambda (a: -A).((eq A (AHead a3 a5) (ASort O n0)) \to ((leq g (ASort O n0) a3) \to ((leq -g a a5) \to P)))) (\lambda (H8: (eq A (AHead a3 a5) (ASort O n0))).(let H9 -\def (eq_ind A (AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda -(_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow -True])) I (ASort O n0) H8) in (False_ind ((leq g (ASort O n0) a3) \to ((leq g -a2 a5) \to P)) H9))) a4 (sym_eq A a4 a2 H7))) a0 (sym_eq A a0 (ASort O n0) -H6))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A (AHead (ASort O n0) a2)) -(refl_equal A (ASort O n0))))) (\lambda (n1: nat).(\lambda (_: (((leq g -(AHead (ASort n1 n0) a2) (ASort n1 n0)) \to P))).(\lambda (H0: (leq g (AHead -(ASort (S n1) n0) a2) (ASort (S n1) n0))).(let H1 \def (match H0 in leq -return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a -(AHead (ASort (S n1) n0) a2)) \to ((eq A a0 (ASort (S n1) n0)) \to P))))) -with [(leq_sort h1 h2 n2 n3 k H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 -n2) (AHead (ASort (S n1) n0) a2))).(\lambda (H3: (eq A (ASort h2 n3) (ASort -(S n1) n0))).((let H4 \def (eq_ind A (ASort h1 n2) (\lambda (e: A).(match e -in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead -_ _) \Rightarrow False])) I (AHead (ASort (S n1) n0) a2) H2) in (False_ind -((eq A (ASort h2 n3) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort h1 n2) k) -(aplus g (ASort h2 n3) k)) \to P)) H4)) H3 H1))) | (leq_head a0 a3 H1 a4 a5 -H2) \Rightarrow (\lambda (H3: (eq A (AHead a0 a4) (AHead (ASort (S n1) n0) -a2))).(\lambda (H4: (eq A (AHead a3 a5) (ASort (S n1) n0))).((let H5 \def -(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with -[(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) -(AHead (ASort (S n1) n0) a2) H3) in ((let H6 \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 a4) (AHead (ASort (S n1) n0) a2) H3) -in (eq_ind A (ASort (S n1) n0) (\lambda (a: A).((eq A a4 a2) \to ((eq A -(AHead a3 a5) (ASort (S n1) n0)) \to ((leq g a a3) \to ((leq g a4 a5) \to -P))))) (\lambda (H7: (eq A a4 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead -a3 a5) (ASort (S n1) n0)) \to ((leq g (ASort (S n1) n0) a3) \to ((leq g a a5) -\to P)))) (\lambda (H8: (eq A (AHead a3 a5) (ASort (S n1) n0))).(let H9 \def -(eq_ind A (AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda (_: -A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow -True])) I (ASort (S n1) n0) H8) in (False_ind ((leq g (ASort (S n1) n0) a3) -\to ((leq g a2 a5) \to P)) H9))) a4 (sym_eq A a4 a2 H7))) a0 (sym_eq A a0 -(ASort (S n1) n0) H6))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A (AHead (ASort -(S n1) n0) a2)) (refl_equal A (ASort (S n1) n0))))))) n H)))))) (\lambda (a: -A).(\lambda (H: ((\forall (a2: A).((leq g (AHead a a2) a) \to (\forall (P: +(ASort O n0) a2) (ASort O n0))).(let H_x \def (leq_gen_head1 g (ASort O n0) +a2 (ASort O n0) H0) in (let H1 \def H_x in (ex3_2_ind A A (\lambda (a3: +A).(\lambda (_: A).(leq g (ASort O n0) a3))) (\lambda (_: A).(\lambda (a4: +A).(leq g a2 a4))) (\lambda (a3: A).(\lambda (a4: A).(eq A (ASort O n0) +(AHead a3 a4)))) P (\lambda (x0: A).(\lambda (x1: A).(\lambda (_: (leq g +(ASort O n0) x0)).(\lambda (_: (leq g a2 x1)).(\lambda (H4: (eq A (ASort O +n0) (AHead x0 x1))).(let H5 \def (eq_ind A (ASort O n0) (\lambda (ee: +A).(match ee in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow +True | (AHead _ _) \Rightarrow False])) I (AHead x0 x1) H4) in (False_ind P +H5))))))) H1)))) (\lambda (n1: nat).(\lambda (_: (((leq g (AHead (ASort n1 +n0) a2) (ASort n1 n0)) \to P))).(\lambda (H0: (leq g (AHead (ASort (S n1) n0) +a2) (ASort (S n1) n0))).(let H_x \def (leq_gen_head1 g (ASort (S n1) n0) a2 +(ASort (S n1) n0) H0) in (let H1 \def H_x in (ex3_2_ind A A (\lambda (a3: +A).(\lambda (_: A).(leq g (ASort (S n1) n0) a3))) (\lambda (_: A).(\lambda +(a4: A).(leq g a2 a4))) (\lambda (a3: A).(\lambda (a4: A).(eq A (ASort (S n1) +n0) (AHead a3 a4)))) P (\lambda (x0: A).(\lambda (x1: A).(\lambda (_: (leq g +(ASort (S n1) n0) x0)).(\lambda (_: (leq g a2 x1)).(\lambda (H4: (eq A (ASort +(S n1) n0) (AHead x0 x1))).(let H5 \def (eq_ind A (ASort (S n1) n0) (\lambda +(ee: A).(match ee in A return (\lambda (_: A).Prop) with [(ASort _ _) +\Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead x0 x1) H4) in +(False_ind P H5))))))) H1)))))) n H)))))) (\lambda (a: A).(\lambda (H: +((\forall (a2: A).((leq g (AHead a a2) a) \to (\forall (P: Prop).P))))).(\lambda (a0: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead a0 a2) a0) \to (\forall (P: Prop).P))))).(\lambda (a2: A).(\lambda (H1: (leq -g (AHead (AHead a a0) a2) (AHead a a0))).(\lambda (P: Prop).(let H2 \def -(match H1 in leq return (\lambda (a3: A).(\lambda (a4: A).(\lambda (_: (leq ? -a3 a4)).((eq A a3 (AHead (AHead a a0) a2)) \to ((eq A a4 (AHead a a0)) \to -P))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A -(ASort h1 n1) (AHead (AHead a a0) a2))).(\lambda (H4: (eq A (ASort h2 n2) -(AHead a a0))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e -in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead -_ _) \Rightarrow False])) I (AHead (AHead a a0) a2) H3) in (False_ind ((eq A -(ASort h2 n2) (AHead a a0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g -(ASort h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head a3 a4 H2 a5 a6 H3) -\Rightarrow (\lambda (H4: (eq A (AHead a3 a5) (AHead (AHead a a0) -a2))).(\lambda (H5: (eq A (AHead a4 a6) (AHead a a0))).((let H6 \def (f_equal -A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a5 | (AHead _ a7) \Rightarrow a7])) (AHead a3 a5) (AHead (AHead a -a0) a2) H4) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e in A -return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead a7 _) -\Rightarrow a7])) (AHead a3 a5) (AHead (AHead a a0) a2) H4) in (eq_ind A -(AHead a a0) (\lambda (a7: A).((eq A a5 a2) \to ((eq A (AHead a4 a6) (AHead a -a0)) \to ((leq g a7 a4) \to ((leq g a5 a6) \to P))))) (\lambda (H8: (eq A a5 -a2)).(eq_ind A a2 (\lambda (a7: A).((eq A (AHead a4 a6) (AHead a a0)) \to -((leq g (AHead a a0) a4) \to ((leq g a7 a6) \to P)))) (\lambda (H9: (eq A -(AHead a4 a6) (AHead a a0))).(let H10 \def (f_equal A A (\lambda (e: -A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a6 | -(AHead _ a7) \Rightarrow a7])) (AHead a4 a6) (AHead a a0) H9) in ((let H11 -\def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) -with [(ASort _ _) \Rightarrow a4 | (AHead a7 _) \Rightarrow a7])) (AHead a4 -a6) (AHead a a0) H9) in (eq_ind A a (\lambda (a7: A).((eq A a6 a0) \to ((leq -g (AHead a a0) a7) \to ((leq g a2 a6) \to P)))) (\lambda (H12: (eq A a6 -a0)).(eq_ind A a0 (\lambda (a7: A).((leq g (AHead a a0) a) \to ((leq g a2 a7) -\to P))) (\lambda (H13: (leq g (AHead a a0) a)).(\lambda (_: (leq g a2 -a0)).(H a0 H13 P))) a6 (sym_eq A a6 a0 H12))) a4 (sym_eq A a4 a H11))) H10))) -a5 (sym_eq A a5 a2 H8))) a3 (sym_eq A a3 (AHead a a0) H7))) H6)) H5 H2 -H3)))]) in (H2 (refl_equal A (AHead (AHead a a0) a2)) (refl_equal A (AHead a -a0))))))))))) a1)). +g (AHead (AHead a a0) a2) (AHead a a0))).(\lambda (P: Prop).(let H_x \def +(leq_gen_head1 g (AHead a a0) a2 (AHead a a0) H1) in (let H2 \def H_x in +(ex3_2_ind A A (\lambda (a3: A).(\lambda (_: A).(leq g (AHead a a0) a3))) +(\lambda (_: A).(\lambda (a4: A).(leq g a2 a4))) (\lambda (a3: A).(\lambda +(a4: A).(eq A (AHead a a0) (AHead a3 a4)))) P (\lambda (x0: A).(\lambda (x1: +A).(\lambda (H3: (leq g (AHead a a0) x0)).(\lambda (H4: (leq g a2 +x1)).(\lambda (H5: (eq A (AHead a a0) (AHead x0 x1))).(let H6 \def (f_equal A +A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) +\Rightarrow a | (AHead a3 _) \Rightarrow a3])) (AHead a a0) (AHead x0 x1) 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 _ a3) \Rightarrow a3])) +(AHead a a0) (AHead x0 x1) H5) in (\lambda (H8: (eq A a x0)).(let H9 \def +(eq_ind_r A x1 (\lambda (a3: A).(leq g a2 a3)) H4 a0 H7) in (let H10 \def +(eq_ind_r A x0 (\lambda (a3: A).(leq g (AHead a a0) a3)) H3 a H8) in (H a0 +H10 P))))) H6))))))) H2)))))))))) a1)). theorem leq_ahead_false_2: \forall (g: G).(\forall (a2: A).(\forall (a1: A).((leq g (AHead a1 a2) a2) @@ -275,97 +170,43 @@ A).((leq g (AHead a1 a) a) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (a1: A).(\lambda (H: (leq g (AHead a1 (ASort n n0)) (ASort n n0))).(\lambda (P: Prop).(nat_ind (\lambda (n1: nat).((leq g (AHead a1 (ASort n1 n0)) (ASort n1 n0)) \to P)) (\lambda (H0: (leq g (AHead -a1 (ASort O n0)) (ASort O n0))).(let H1 \def (match H0 in leq return (\lambda -(a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (AHead a1 (ASort -O n0))) \to ((eq A a0 (ASort O n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k -H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 n1) (AHead a1 (ASort O -n0)))).(\lambda (H3: (eq A (ASort h2 n2) (ASort O n0))).((let H4 \def (eq_ind -A (ASort h1 n1) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) -with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I -(AHead a1 (ASort O n0)) H2) in (False_ind ((eq A (ASort h2 n2) (ASort O n0)) -\to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H4)) -H3 H1))) | (leq_head a0 a3 H1 a4 a5 H2) \Rightarrow (\lambda (H3: (eq A -(AHead a0 a4) (AHead a1 (ASort O n0)))).(\lambda (H4: (eq A (AHead a3 a5) -(ASort O n0))).((let H5 \def (f_equal A A (\lambda (e: A).(match e in A -return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) -\Rightarrow a])) (AHead a0 a4) (AHead a1 (ASort O n0)) H3) in ((let H6 \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 a4) -(AHead a1 (ASort O n0)) H3) in (eq_ind A a1 (\lambda (a: A).((eq A a4 (ASort -O n0)) \to ((eq A (AHead a3 a5) (ASort O n0)) \to ((leq g a a3) \to ((leq g -a4 a5) \to P))))) (\lambda (H7: (eq A a4 (ASort O n0))).(eq_ind A (ASort O -n0) (\lambda (a: A).((eq A (AHead a3 a5) (ASort O n0)) \to ((leq g a1 a3) \to -((leq g a a5) \to P)))) (\lambda (H8: (eq A (AHead a3 a5) (ASort O n0))).(let -H9 \def (eq_ind A (AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda -(_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow -True])) I (ASort O n0) H8) in (False_ind ((leq g a1 a3) \to ((leq g (ASort O -n0) a5) \to P)) H9))) a4 (sym_eq A a4 (ASort O n0) H7))) a0 (sym_eq A a0 a1 -H6))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A (AHead a1 (ASort O n0))) -(refl_equal A (ASort O n0))))) (\lambda (n1: nat).(\lambda (_: (((leq g -(AHead a1 (ASort n1 n0)) (ASort n1 n0)) \to P))).(\lambda (H0: (leq g (AHead -a1 (ASort (S n1) n0)) (ASort (S n1) n0))).(let H1 \def (match H0 in leq -return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a -(AHead a1 (ASort (S n1) n0))) \to ((eq A a0 (ASort (S n1) n0)) \to P))))) -with [(leq_sort h1 h2 n2 n3 k H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 -n2) (AHead a1 (ASort (S n1) n0)))).(\lambda (H3: (eq A (ASort h2 n3) (ASort -(S n1) n0))).((let H4 \def (eq_ind A (ASort h1 n2) (\lambda (e: A).(match e -in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead -_ _) \Rightarrow False])) I (AHead a1 (ASort (S n1) n0)) H2) in (False_ind -((eq A (ASort h2 n3) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort h1 n2) k) -(aplus g (ASort h2 n3) k)) \to P)) H4)) H3 H1))) | (leq_head a0 a3 H1 a4 a5 -H2) \Rightarrow (\lambda (H3: (eq A (AHead a0 a4) (AHead a1 (ASort (S n1) -n0)))).(\lambda (H4: (eq A (AHead a3 a5) (ASort (S n1) n0))).((let H5 \def -(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with -[(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) -(AHead a1 (ASort (S n1) n0)) H3) in ((let H6 \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 a4) (AHead a1 (ASort (S n1) n0)) H3) -in (eq_ind A a1 (\lambda (a: A).((eq A a4 (ASort (S n1) n0)) \to ((eq A -(AHead a3 a5) (ASort (S n1) n0)) \to ((leq g a a3) \to ((leq g a4 a5) \to -P))))) (\lambda (H7: (eq A a4 (ASort (S n1) n0))).(eq_ind A (ASort (S n1) n0) -(\lambda (a: A).((eq A (AHead a3 a5) (ASort (S n1) n0)) \to ((leq g a1 a3) -\to ((leq g a a5) \to P)))) (\lambda (H8: (eq A (AHead a3 a5) (ASort (S n1) -n0))).(let H9 \def (eq_ind A (AHead a3 a5) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ -_) \Rightarrow True])) I (ASort (S n1) n0) H8) in (False_ind ((leq g a1 a3) -\to ((leq g (ASort (S n1) n0) a5) \to P)) H9))) a4 (sym_eq A a4 (ASort (S n1) -n0) H7))) a0 (sym_eq A a0 a1 H6))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A -(AHead a1 (ASort (S n1) n0))) (refl_equal A (ASort (S n1) n0))))))) n H)))))) -(\lambda (a: A).(\lambda (_: ((\forall (a1: A).((leq g (AHead a1 a) a) \to -(\forall (P: Prop).P))))).(\lambda (a0: A).(\lambda (H0: ((\forall (a1: -A).((leq g (AHead a1 a0) a0) \to (\forall (P: Prop).P))))).(\lambda (a1: -A).(\lambda (H1: (leq g (AHead a1 (AHead a a0)) (AHead a a0))).(\lambda (P: -Prop).(let H2 \def (match H1 in leq return (\lambda (a3: A).(\lambda (a4: -A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (AHead a1 (AHead a a0))) \to ((eq A -a4 (AHead a a0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow -(\lambda (H3: (eq A (ASort h1 n1) (AHead a1 (AHead a a0)))).(\lambda (H4: (eq -A (ASort h2 n2) (AHead a a0))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda -(e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) -\Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a1 (AHead a a0)) -H3) in (False_ind ((eq A (ASort h2 n2) (AHead a a0)) \to ((eq A (aplus g -(ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head -a3 a4 H2 a5 a6 H3) \Rightarrow (\lambda (H4: (eq A (AHead a3 a5) (AHead a1 -(AHead a a0)))).(\lambda (H5: (eq A (AHead a4 a6) (AHead a a0))).((let H6 -\def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) -with [(ASort _ _) \Rightarrow a5 | (AHead _ a7) \Rightarrow a7])) (AHead a3 -a5) (AHead a1 (AHead a a0)) H4) in ((let H7 \def (f_equal A A (\lambda (e: -A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | -(AHead a7 _) \Rightarrow a7])) (AHead a3 a5) (AHead a1 (AHead a a0)) H4) in -(eq_ind A a1 (\lambda (a7: A).((eq A a5 (AHead a a0)) \to ((eq A (AHead a4 -a6) (AHead a a0)) \to ((leq g a7 a4) \to ((leq g a5 a6) \to P))))) (\lambda -(H8: (eq A a5 (AHead a a0))).(eq_ind A (AHead a a0) (\lambda (a7: A).((eq A -(AHead a4 a6) (AHead a a0)) \to ((leq g a1 a4) \to ((leq g a7 a6) \to P)))) -(\lambda (H9: (eq A (AHead a4 a6) (AHead a a0))).(let H10 \def (f_equal A A -(\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a6 | (AHead _ a7) \Rightarrow a7])) (AHead a4 a6) (AHead a a0) -H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e in A return -(\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead a7 _) -\Rightarrow a7])) (AHead a4 a6) (AHead a a0) H9) in (eq_ind A a (\lambda (a7: -A).((eq A a6 a0) \to ((leq g a1 a7) \to ((leq g (AHead a a0) a6) \to P)))) -(\lambda (H12: (eq A a6 a0)).(eq_ind A a0 (\lambda (a7: A).((leq g a1 a) \to -((leq g (AHead a a0) a7) \to P))) (\lambda (_: (leq g a1 a)).(\lambda (H14: -(leq g (AHead a a0) a0)).(H0 a H14 P))) a6 (sym_eq A a6 a0 H12))) a4 (sym_eq -A a4 a H11))) H10))) a5 (sym_eq A a5 (AHead a a0) H8))) a3 (sym_eq A a3 a1 -H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (AHead a1 (AHead a a0))) -(refl_equal A (AHead a a0))))))))))) a2)). +a1 (ASort O n0)) (ASort O n0))).(let H_x \def (leq_gen_head1 g a1 (ASort O +n0) (ASort O n0) H0) in (let H1 \def H_x in (ex3_2_ind A A (\lambda (a3: +A).(\lambda (_: A).(leq g a1 a3))) (\lambda (_: A).(\lambda (a4: A).(leq g +(ASort O n0) a4))) (\lambda (a3: A).(\lambda (a4: A).(eq A (ASort O n0) +(AHead a3 a4)))) P (\lambda (x0: A).(\lambda (x1: A).(\lambda (_: (leq g a1 +x0)).(\lambda (_: (leq g (ASort O n0) x1)).(\lambda (H4: (eq A (ASort O n0) +(AHead x0 x1))).(let H5 \def (eq_ind A (ASort O n0) (\lambda (ee: A).(match +ee in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | +(AHead _ _) \Rightarrow False])) I (AHead x0 x1) H4) in (False_ind P +H5))))))) H1)))) (\lambda (n1: nat).(\lambda (_: (((leq g (AHead a1 (ASort n1 +n0)) (ASort n1 n0)) \to P))).(\lambda (H0: (leq g (AHead a1 (ASort (S n1) +n0)) (ASort (S n1) n0))).(let H_x \def (leq_gen_head1 g a1 (ASort (S n1) n0) +(ASort (S n1) n0) H0) in (let H1 \def H_x in (ex3_2_ind A A (\lambda (a3: +A).(\lambda (_: A).(leq g a1 a3))) (\lambda (_: A).(\lambda (a4: A).(leq g +(ASort (S n1) n0) a4))) (\lambda (a3: A).(\lambda (a4: A).(eq A (ASort (S n1) +n0) (AHead a3 a4)))) P (\lambda (x0: A).(\lambda (x1: A).(\lambda (_: (leq g +a1 x0)).(\lambda (_: (leq g (ASort (S n1) n0) x1)).(\lambda (H4: (eq A (ASort +(S n1) n0) (AHead x0 x1))).(let H5 \def (eq_ind A (ASort (S n1) n0) (\lambda +(ee: A).(match ee in A return (\lambda (_: A).Prop) with [(ASort _ _) +\Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead x0 x1) H4) in +(False_ind P H5))))))) H1)))))) n H)))))) (\lambda (a: A).(\lambda (_: +((\forall (a1: A).((leq g (AHead a1 a) a) \to (\forall (P: +Prop).P))))).(\lambda (a0: A).(\lambda (H0: ((\forall (a1: A).((leq g (AHead +a1 a0) a0) \to (\forall (P: Prop).P))))).(\lambda (a1: A).(\lambda (H1: (leq +g (AHead a1 (AHead a a0)) (AHead a a0))).(\lambda (P: Prop).(let H_x \def +(leq_gen_head1 g a1 (AHead a a0) (AHead a a0) H1) in (let H2 \def H_x in +(ex3_2_ind A A (\lambda (a3: A).(\lambda (_: A).(leq g a1 a3))) (\lambda (_: +A).(\lambda (a4: A).(leq g (AHead a a0) a4))) (\lambda (a3: A).(\lambda (a4: +A).(eq A (AHead a a0) (AHead a3 a4)))) P (\lambda (x0: A).(\lambda (x1: +A).(\lambda (H3: (leq g a1 x0)).(\lambda (H4: (leq g (AHead a a0) +x1)).(\lambda (H5: (eq A (AHead a a0) (AHead x0 x1))).(let H6 \def (f_equal A +A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) +\Rightarrow a | (AHead a3 _) \Rightarrow a3])) (AHead a a0) (AHead x0 x1) 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 _ a3) \Rightarrow a3])) +(AHead a a0) (AHead x0 x1) H5) in (\lambda (H8: (eq A a x0)).(let H9 \def +(eq_ind_r A x1 (\lambda (a3: A).(leq g (AHead a a0) a3)) H4 a0 H7) in (let +H10 \def (eq_ind_r A x0 (\lambda (a3: A).(leq g a1 a3)) H3 a H8) in (H0 a H9 +P))))) H6))))))) H2)))))))))) a2)). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/nf2/arity.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/nf2/arity.ma index 867f573e8..0b17ee378 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/nf2/arity.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/nf2/arity.ma @@ -289,72 +289,33 @@ u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (THead (Flat Appl) u t1) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u t1) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) -(\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i))))))) (let H13 \def -(match (arity_gen_sort g c0 x (AHead a1 a2) H12) in leq return (\lambda (a0: -A).(\lambda (a3: A).(\lambda (_: (leq ? a0 a3)).((eq A a0 (AHead a1 a2)) \to -((eq A a3 (ASort O x)) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: -T).(eq T (THead (Flat Appl) u (TSort x)) (THead (Bind Abst) w u0)))) (\lambda -(w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u0: T).(nf2 -(CHead c0 (Bind Abst) w) u0)))) (ex nat (\lambda (n: nat).(eq T (THead (Flat -Appl) u (TSort x)) (TSort n)))) (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u (TSort x)) (THeads (Flat -Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) -(\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i))))))))))) with -[(leq_sort h1 h2 n1 n2 k H13) \Rightarrow (\lambda (H14: (eq A (ASort h1 n1) -(AHead a1 a2))).(\lambda (H15: (eq A (ASort h2 n2) (ASort O x))).((let H16 -\def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A return (\lambda -(_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow -False])) I (AHead a1 a2) H14) in (False_ind ((eq A (ASort h2 n2) (ASort O x)) -\to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (or3 -(ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat Appl) u (TSort -x)) (THead (Bind Abst) w u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) -(\lambda (w: T).(\lambda (u0: T).(nf2 (CHead c0 (Bind Abst) w) u0)))) (ex nat -(\lambda (n: nat).(eq T (THead (Flat Appl) u (TSort x)) (TSort n)))) (ex3_2 -TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u -(TSort x)) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda -(_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef -i)))))))) H16)) H15 H13))) | (leq_head a0 a3 H13 a4 a5 H14) \Rightarrow -(\lambda (H15: (eq A (AHead a0 a4) (AHead a1 a2))).(\lambda (H16: (eq A -(AHead a3 a5) (ASort O x))).((let H17 \def (f_equal A A (\lambda (e: -A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | -(AHead _ a6) \Rightarrow a6])) (AHead a0 a4) (AHead a1 a2) H15) in ((let H18 -\def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) -with [(ASort _ _) \Rightarrow a0 | (AHead a6 _) \Rightarrow a6])) (AHead a0 -a4) (AHead a1 a2) H15) in (eq_ind A a1 (\lambda (a6: A).((eq A a4 a2) \to -((eq A (AHead a3 a5) (ASort O x)) \to ((leq g a6 a3) \to ((leq g a4 a5) \to -(or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat Appl) u -(TSort x)) (THead (Bind Abst) w u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 -c0 w))) (\lambda (w: T).(\lambda (u0: T).(nf2 (CHead c0 (Bind Abst) w) u0)))) -(ex nat (\lambda (n: nat).(eq T (THead (Flat Appl) u (TSort x)) (TSort n)))) -(ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat -Appl) u (TSort x)) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: -TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: -nat).(nf2 c0 (TLRef i))))))))))) (\lambda (H19: (eq A a4 a2)).(eq_ind A a2 -(\lambda (a6: A).((eq A (AHead a3 a5) (ASort O x)) \to ((leq g a1 a3) \to -((leq g a6 a5) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T -(THead (Flat Appl) u (TSort x)) (THead (Bind Abst) w u0)))) (\lambda (w: -T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u0: T).(nf2 (CHead -c0 (Bind Abst) w) u0)))) (ex nat (\lambda (n: nat).(eq T (THead (Flat Appl) u -(TSort x)) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: -nat).(eq T (THead (Flat Appl) u (TSort x)) (THeads (Flat Appl) ws (TLRef -i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))))))))) (\lambda (H20: (eq A -(AHead a3 a5) (ASort O x))).(let H21 \def (eq_ind A (AHead a3 a5) (\lambda -(e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) -\Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O x) H20) in -(False_ind ((leq g a1 a3) \to ((leq g a2 a5) \to (or3 (ex3_2 T T (\lambda (w: -T).(\lambda (u0: T).(eq T (THead (Flat Appl) u (TSort x)) (THead (Bind Abst) -w u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: -T).(\lambda (u0: T).(nf2 (CHead c0 (Bind Abst) w) u0)))) (ex nat (\lambda (n: -nat).(eq T (THead (Flat Appl) u (TSort x)) (TSort n)))) (ex3_2 TList nat +(\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i))))))) (let H_x0 \def +(leq_gen_head1 g a1 a2 (ASort O x) (arity_gen_sort g c0 x (AHead a1 a2) H12)) +in (let H13 \def H_x0 in (ex3_2_ind A A (\lambda (a3: A).(\lambda (_: A).(leq +g a1 a3))) (\lambda (_: A).(\lambda (a4: A).(leq g a2 a4))) (\lambda (a3: +A).(\lambda (a4: A).(eq A (ASort O x) (AHead a3 a4)))) (or3 (ex3_2 T T +(\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat Appl) u (TSort x)) (THead +(Bind Abst) w u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda +(w: T).(\lambda (u0: T).(nf2 (CHead c0 (Bind Abst) w) u0)))) (ex nat (\lambda +(n: nat).(eq T (THead (Flat Appl) u (TSort x)) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u (TSort x)) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef -i)))))))) H21))) a4 (sym_eq A a4 a2 H19))) a0 (sym_eq A a0 a1 H18))) H17)) -H16 H13 H14)))]) in (H13 (refl_equal A (AHead a1 a2)) (refl_equal A (ASort O -x)))) t0 H10))))) H9)) (\lambda (H9: (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T t0 (THeads (Flat Appl) ws (TLRef i))))) -(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: +i)))))) (\lambda (x0: A).(\lambda (x1: A).(\lambda (_: (leq g a1 +x0)).(\lambda (_: (leq g a2 x1)).(\lambda (H16: (eq A (ASort O x) (AHead x0 +x1))).(let H17 \def (eq_ind A (ASort O x) (\lambda (ee: A).(match ee in A +return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) +\Rightarrow False])) I (AHead x0 x1) H16) in (False_ind (or3 (ex3_2 T T +(\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat Appl) u (TSort x)) (THead +(Bind Abst) w u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda +(w: T).(\lambda (u0: T).(nf2 (CHead c0 (Bind Abst) w) u0)))) (ex nat (\lambda +(n: nat).(eq T (THead (Flat Appl) u (TSort x)) (TSort n)))) (ex3_2 TList nat +(\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u (TSort x)) +(THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef +i)))))) H17))))))) H13))) t0 H10))))) H9)) (\lambda (H9: (ex3_2 TList nat +(\lambda (ws: TList).(\lambda (i: nat).(eq T t0 (THeads (Flat Appl) ws (TLRef +i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))))).(ex3_2_ind TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T t0 (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sc3/props.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sc3/props.ma index 8cf36c0b4..b77d40402 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sc3/props.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sc3/props.ma @@ -72,17 +72,18 @@ c t) \to (\forall (a4: A).((leq g a3 a4) \to (sc3 g a4 c t)))))))))).(\lambda t))).(\lambda (a3: A).(\lambda (H1: (leq g (ASort n n0) a3)).(let H2 \def H0 in (and_ind (arity g c t (ASort n n0)) (sn3 c t) (sc3 g a3 c t) (\lambda (H3: (arity g c t (ASort n n0))).(\lambda (H4: (sn3 c t)).(let H_y \def -(arity_repl g c t (ASort n n0) H3 a3 H1) in (let H_x \def (leq_gen_sort g n +(arity_repl g c t (ASort n n0) H3 a3 H1) in (let H_x \def (leq_gen_sort1 g n n0 a3 H1) in (let H5 \def H_x in (ex2_3_ind nat nat nat (\lambda (n2: -nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A a3 (ASort h2 n2))))) (\lambda -(n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort n n0) k) -(aplus g (ASort h2 n2) k))))) (sc3 g a3 c t) (\lambda (x0: nat).(\lambda (x1: -nat).(\lambda (x2: nat).(\lambda (H6: (eq A a3 (ASort x1 x0))).(\lambda (_: -(eq A (aplus g (ASort n n0) x2) (aplus g (ASort x1 x0) x2))).(let H8 \def -(eq_ind A a3 (\lambda (a: A).(arity g c t a)) H_y (ASort x1 x0) H6) in -(eq_ind_r A (ASort x1 x0) (\lambda (a: A).(sc3 g a c t)) (conj (arity g c t -(ASort x1 x0)) (sn3 c t) H8 H4) a3 H6))))))) H5)))))) H2)))))))))) (\lambda -(a: A).(\lambda (_: ((((\forall (a3: A).((llt a3 a) \to (\forall (c: +nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort n n0) k) +(aplus g (ASort h2 n2) k))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda +(_: nat).(eq A a3 (ASort h2 n2))))) (sc3 g a3 c t) (\lambda (x0: +nat).(\lambda (x1: nat).(\lambda (x2: nat).(\lambda (_: (eq A (aplus g (ASort +n n0) x2) (aplus g (ASort x1 x0) x2))).(\lambda (H7: (eq A a3 (ASort x1 +x0))).(let H8 \def (f_equal A A (\lambda (e: A).e) a3 (ASort x1 x0) H7) in +(let H9 \def (eq_ind A a3 (\lambda (a: A).(arity g c t a)) H_y (ASort x1 x0) +H8) in (eq_ind_r A (ASort x1 x0) (\lambda (a: A).(sc3 g a c t)) (conj (arity +g c t (ASort x1 x0)) (sn3 c t) H9 H4) a3 H8)))))))) H5)))))) H2)))))))))) +(\lambda (a: A).(\lambda (_: ((((\forall (a3: A).((llt a3 a) \to (\forall (c: C).(\forall (t: T).((sc3 g a3 c t) \to (\forall (a4: A).((leq g a3 a4) \to (sc3 g a4 c t))))))))) \to (\forall (c: C).(\forall (t: T).((sc3 g a c t) \to (\forall (a3: A).((leq g a a3) \to (sc3 g a3 c t))))))))).(\lambda (a0: @@ -101,24 +102,25 @@ T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w (lift1 is t)))))))) (sc3 g a3 c t) (\lambda (H5: (arity g c t (AHead a a0))).(\lambda (H6: ((\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat -Appl) w (lift1 is t)))))))))).(let H_x \def (leq_gen_head g a a0 a3 H3) in -(let H7 \def H_x in (ex3_2_ind A A (\lambda (a4: A).(\lambda (a5: A).(eq A a3 -(AHead a4 a5)))) (\lambda (a4: A).(\lambda (_: A).(leq g a a4))) (\lambda (_: -A).(\lambda (a5: A).(leq g a0 a5))) (sc3 g a3 c t) (\lambda (x0: A).(\lambda -(x1: A).(\lambda (H8: (eq A a3 (AHead x0 x1))).(\lambda (H9: (leq g a -x0)).(\lambda (H10: (leq g a0 x1)).(eq_ind_r A (AHead x0 x1) (\lambda (a4: -A).(sc3 g a4 c t)) (conj (arity g c t (AHead x0 x1)) (\forall (d: C).(\forall -(w: T).((sc3 g x0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g x1 -d (THead (Flat Appl) w (lift1 is t)))))))) (arity_repl g c t (AHead a a0) H5 -(AHead x0 x1) (leq_head g a x0 H9 a0 x1 H10)) (\lambda (d: C).(\lambda (w: -T).(\lambda (H11: (sc3 g x0 d w)).(\lambda (is: PList).(\lambda (H12: (drop1 -is d c)).(H0 (\lambda (a4: A).(\lambda (H13: (llt a4 a0)).(\lambda (c0: -C).(\lambda (t0: T).(\lambda (H14: (sc3 g a4 c0 t0)).(\lambda (a5: -A).(\lambda (H15: (leq g a4 a5)).(H1 a4 (llt_trans a4 a0 (AHead a a0) H13 -(llt_head_dx a a0)) c0 t0 H14 a5 H15)))))))) d (THead (Flat Appl) w (lift1 is -t)) (H6 d w (H1 x0 (llt_repl g a x0 H9 (AHead a a0) (llt_head_sx a a0)) d w -H11 a (leq_sym g a x0 H9)) is H12) x1 H10))))))) a3 H8)))))) H7))))) -H4)))))))))))) a2)) a1)). +Appl) w (lift1 is t)))))))))).(let H_x \def (leq_gen_head1 g a a0 a3 H3) in +(let H7 \def H_x in (ex3_2_ind A A (\lambda (a4: A).(\lambda (_: A).(leq g a +a4))) (\lambda (_: A).(\lambda (a5: A).(leq g a0 a5))) (\lambda (a4: +A).(\lambda (a5: A).(eq A a3 (AHead a4 a5)))) (sc3 g a3 c t) (\lambda (x0: +A).(\lambda (x1: A).(\lambda (H8: (leq g a x0)).(\lambda (H9: (leq g a0 +x1)).(\lambda (H10: (eq A a3 (AHead x0 x1))).(let H11 \def (f_equal A A +(\lambda (e: A).e) a3 (AHead x0 x1) H10) in (eq_ind_r A (AHead x0 x1) +(\lambda (a4: A).(sc3 g a4 c t)) (conj (arity g c t (AHead x0 x1)) (\forall +(d: C).(\forall (w: T).((sc3 g x0 d w) \to (\forall (is: PList).((drop1 is d +c) \to (sc3 g x1 d (THead (Flat Appl) w (lift1 is t)))))))) (arity_repl g c t +(AHead a a0) H5 (AHead x0 x1) (leq_head g a x0 H8 a0 x1 H9)) (\lambda (d: +C).(\lambda (w: T).(\lambda (H12: (sc3 g x0 d w)).(\lambda (is: +PList).(\lambda (H13: (drop1 is d c)).(H0 (\lambda (a4: A).(\lambda (H14: +(llt a4 a0)).(\lambda (c0: C).(\lambda (t0: T).(\lambda (H15: (sc3 g a4 c0 +t0)).(\lambda (a5: A).(\lambda (H16: (leq g a4 a5)).(H1 a4 (llt_trans a4 a0 +(AHead a a0) H14 (llt_head_dx a a0)) c0 t0 H15 a5 H16)))))))) d (THead (Flat +Appl) w (lift1 is t)) (H6 d w (H1 x0 (llt_repl g a x0 H8 (AHead a a0) +(llt_head_sx a a0)) d w H12 a (leq_sym g a x0 H8)) is H13) x1 H9))))))) a3 +H11))))))) H7))))) H4)))))))))))) a2)) a1)). theorem sc3_lift: \forall (g: G).(\forall (a: A).(\forall (e: C).(\forall (t: T).((sc3 g a e diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/arity.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/arity.ma index 5f63defc6..4f6b4cf13 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/arity.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/arity.ma @@ -77,91 +77,91 @@ c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O u) (asucc g a1)))) (\lambda (x0: A).(\lambda (H7: (leq g x (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O u) (asucc g a1))) x0 (arity_abst g c0 d u n H0 x0 (arity_repl g -d u x H4 (asucc g x0) H7)) (arity_lift g d u (asucc g x0) (arity_repl g d u x -H4 (asucc g x0) H7) c0 (S n) O (getl_drop Abst c0 d u n H0))))) H6)))))) -H3)))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: -(ty3 g c0 u t)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity g c0 u a1)) -(\lambda (a1: A).(arity g c0 t (asucc g a1))))).(\lambda (b: B).(\lambda (t3: -T).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t3 -t4)).(\lambda (H3: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t3 -a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t4 (asucc g a1))))).(let -H4 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: -A).(arity g c0 t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead -(Bind b) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) u t4) (asucc -g a1)))) (\lambda (x: A).(\lambda (H5: (arity g c0 u x)).(\lambda (_: (arity -g c0 t (asucc g x))).(let H7 \def H3 in (ex2_ind A (\lambda (a1: A).(arity g -(CHead c0 (Bind b) u) t3 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) -t4 (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b) u t3) -a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) u t4) (asucc g a1)))) -(\lambda (x0: A).(\lambda (H8: (arity g (CHead c0 (Bind b) u) t3 -x0)).(\lambda (H9: (arity g (CHead c0 (Bind b) u) t4 (asucc g x0))).(let H_x -\def (leq_asucc g x) in (let H10 \def H_x in (ex_ind A (\lambda (a0: A).(leq -g x (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b) u t3) -a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) u t4) (asucc g a1)))) -(\lambda (x1: A).(\lambda (H11: (leq g x (asucc g x1))).(B_ind (\lambda (b0: -B).((arity g (CHead c0 (Bind b0) u) t3 x0) \to ((arity g (CHead c0 (Bind b0) -u) t4 (asucc g x0)) \to (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b0) -u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b0) u t4) (asucc g -a1))))))) (\lambda (H12: (arity g (CHead c0 (Bind Abbr) u) t3 x0)).(\lambda -(H13: (arity g (CHead c0 (Bind Abbr) u) t4 (asucc g x0))).(ex_intro2 A -(\lambda (a1: A).(arity g c0 (THead (Bind Abbr) u t3) a1)) (\lambda (a1: -A).(arity g c0 (THead (Bind Abbr) u t4) (asucc g a1))) x0 (arity_bind g Abbr -not_abbr_abst c0 u x H5 t3 x0 H12) (arity_bind g Abbr not_abbr_abst c0 u x H5 -t4 (asucc g x0) H13)))) (\lambda (H12: (arity g (CHead c0 (Bind Abst) u) t3 -x0)).(\lambda (H13: (arity g (CHead c0 (Bind Abst) u) t4 (asucc g -x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t3) a1)) -(\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t4) (asucc g a1))) (AHead -x1 x0) (arity_head g c0 u x1 (arity_repl g c0 u x H5 (asucc g x1) H11) t3 x0 -H12) (arity_repl g c0 (THead (Bind Abst) u t4) (AHead x1 (asucc g x0)) -(arity_head g c0 u x1 (arity_repl g c0 u x H5 (asucc g x1) H11) t4 (asucc g -x0) H13) (asucc g (AHead x1 x0)) (leq_refl g (asucc g (AHead x1 x0))))))) -(\lambda (H12: (arity g (CHead c0 (Bind Void) u) t3 x0)).(\lambda (H13: -(arity g (CHead c0 (Bind Void) u) t4 (asucc g x0))).(ex_intro2 A (\lambda -(a1: A).(arity g c0 (THead (Bind Void) u t3) a1)) (\lambda (a1: A).(arity g -c0 (THead (Bind Void) u t4) (asucc g a1))) x0 (arity_bind g Void -not_void_abst c0 u x H5 t3 x0 H12) (arity_bind g Void not_void_abst c0 u x H5 -t4 (asucc g x0) H13)))) b H8 H9))) H10)))))) H7))))) H4)))))))))))) (\lambda -(c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda -(H1: (ex2 A (\lambda (a1: A).(arity g c0 w a1)) (\lambda (a1: A).(arity g c0 -u (asucc g a1))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v -(THead (Bind Abst) u t))).(\lambda (H3: (ex2 A (\lambda (a1: A).(arity g c0 v -a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t) (asucc g -a1))))).(let H4 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 w a1)) -(\lambda (a1: A).(arity g c0 u (asucc g a1))) (ex2 A (\lambda (a1: A).(arity -g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat -Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) (\lambda (x: A).(\lambda -(H5: (arity g c0 w x)).(\lambda (H6: (arity g c0 u (asucc g x))).(let H7 \def -H3 in (ex2_ind A (\lambda (a1: A).(arity g c0 v a1)) (\lambda (a1: A).(arity -g c0 (THead (Bind Abst) u t) (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g -c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat -Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) (\lambda (x0: A).(\lambda -(H8: (arity g c0 v x0)).(\lambda (H9: (arity g c0 (THead (Bind Abst) u t) -(asucc g x0))).(let H10 \def (arity_gen_abst g c0 u t (asucc g x0) H9) in -(ex3_2_ind A A (\lambda (a1: A).(\lambda (a2: A).(eq A (asucc g x0) (AHead a1 -a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) -(\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))) -(ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda -(a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g -a1)))) (\lambda (x1: A).(\lambda (x2: A).(\lambda (H11: (eq A (asucc g x0) -(AHead x1 x2))).(\lambda (H12: (arity g c0 u (asucc g x1))).(\lambda (H13: -(arity g (CHead c0 (Bind Abst) u) t x2)).(let H14 \def (sym_eq A (asucc g x0) -(AHead x1 x2) H11) in (let H15 \def (asucc_gen_head g x1 x2 x0 H14) in -(ex2_ind A (\lambda (a0: A).(eq A x0 (AHead x1 a0))) (\lambda (a0: A).(eq A -x2 (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) +d u x H4 (asucc g x0) H7)) (arity_repl g c0 (lift (S n) O u) x (arity_lift g +d u x H4 c0 (S n) O (getl_drop Abst c0 d u n H0)) (asucc g x0) H7)))) +H6)))))) H3)))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: +T).(\lambda (_: (ty3 g c0 u t)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity +g c0 u a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))))).(\lambda (b: +B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) +u) t3 t4)).(\lambda (H3: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b) +u) t3 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t4 (asucc g +a1))))).(let H4 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 u a1)) +(\lambda (a1: A).(arity g c0 t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity +g c0 (THead (Bind b) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) +u t4) (asucc g a1)))) (\lambda (x: A).(\lambda (H5: (arity g c0 u +x)).(\lambda (_: (arity g c0 t (asucc g x))).(let H7 \def H3 in (ex2_ind A +(\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t3 a1)) (\lambda (a1: +A).(arity g (CHead c0 (Bind b) u) t4 (asucc g a1))) (ex2 A (\lambda (a1: +A).(arity g c0 (THead (Bind b) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead +(Bind b) u t4) (asucc g a1)))) (\lambda (x0: A).(\lambda (H8: (arity g (CHead +c0 (Bind b) u) t3 x0)).(\lambda (H9: (arity g (CHead c0 (Bind b) u) t4 (asucc +g x0))).(let H_x \def (leq_asucc g x) in (let H10 \def H_x in (ex_ind A +(\lambda (a0: A).(leq g x (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g c0 +(THead (Bind b) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) u t4) +(asucc g a1)))) (\lambda (x1: A).(\lambda (H11: (leq g x (asucc g +x1))).(B_ind (\lambda (b0: B).((arity g (CHead c0 (Bind b0) u) t3 x0) \to +((arity g (CHead c0 (Bind b0) u) t4 (asucc g x0)) \to (ex2 A (\lambda (a1: +A).(arity g c0 (THead (Bind b0) u t3) a1)) (\lambda (a1: A).(arity g c0 +(THead (Bind b0) u t4) (asucc g a1))))))) (\lambda (H12: (arity g (CHead c0 +(Bind Abbr) u) t3 x0)).(\lambda (H13: (arity g (CHead c0 (Bind Abbr) u) t4 +(asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Abbr) u +t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abbr) u t4) (asucc g a1))) +x0 (arity_bind g Abbr not_abbr_abst c0 u x H5 t3 x0 H12) (arity_bind g Abbr +not_abbr_abst c0 u x H5 t4 (asucc g x0) H13)))) (\lambda (H12: (arity g +(CHead c0 (Bind Abst) u) t3 x0)).(\lambda (H13: (arity g (CHead c0 (Bind +Abst) u) t4 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead +(Bind Abst) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t4) +(asucc g a1))) (AHead x1 x0) (arity_head g c0 u x1 (arity_repl g c0 u x H5 +(asucc g x1) H11) t3 x0 H12) (arity_repl g c0 (THead (Bind Abst) u t4) (AHead +x1 (asucc g x0)) (arity_head g c0 u x1 (arity_repl g c0 u x H5 (asucc g x1) +H11) t4 (asucc g x0) H13) (asucc g (AHead x1 x0)) (leq_refl g (asucc g (AHead +x1 x0))))))) (\lambda (H12: (arity g (CHead c0 (Bind Void) u) t3 +x0)).(\lambda (H13: (arity g (CHead c0 (Bind Void) u) t4 (asucc g +x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Void) u t3) a1)) +(\lambda (a1: A).(arity g c0 (THead (Bind Void) u t4) (asucc g a1))) x0 +(arity_bind g Void not_void_abst c0 u x H5 t3 x0 H12) (arity_bind g Void +not_void_abst c0 u x H5 t4 (asucc g x0) H13)))) b H8 H9))) H10)))))) H7))))) +H4)))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: +(ty3 g c0 w u)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity g c0 w a1)) +(\lambda (a1: A).(arity g c0 u (asucc g a1))))).(\lambda (v: T).(\lambda (t: +T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (H3: (ex2 A +(\lambda (a1: A).(arity g c0 v a1)) (\lambda (a1: A).(arity g c0 (THead (Bind +Abst) u t) (asucc g a1))))).(let H4 \def H1 in (ex2_ind A (\lambda (a1: +A).(arity g c0 w a1)) (\lambda (a1: A).(arity g c0 u (asucc g a1))) (ex2 A +(\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: +A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) +(\lambda (x: A).(\lambda (H5: (arity g c0 w x)).(\lambda (H6: (arity g c0 u +(asucc g x))).(let H7 \def H3 in (ex2_ind A (\lambda (a1: A).(arity g c0 v +a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t) (asucc g a1))) (ex2 +A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: +A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) +(\lambda (x0: A).(\lambda (H8: (arity g c0 v x0)).(\lambda (H9: (arity g c0 +(THead (Bind Abst) u t) (asucc g x0))).(let H10 \def (arity_gen_abst g c0 u t +(asucc g x0) H9) in (ex3_2_ind A A (\lambda (a1: A).(\lambda (a2: A).(eq A +(asucc g x0) (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u +(asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind +Abst) u) t a2))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u -t)) (asucc g a1)))) (\lambda (x3: A).(\lambda (H16: (eq A x0 (AHead x1 -x3))).(\lambda (H17: (eq A x2 (asucc g x3))).(let H18 \def (eq_ind A x2 -(\lambda (a: A).(arity g (CHead c0 (Bind Abst) u) t a)) H13 (asucc g x3) H17) -in (let H19 \def (eq_ind A x0 (\lambda (a: A).(arity g c0 v a)) H8 (AHead x1 -x3) H16) in (ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) -a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u -t)) (asucc g a1))) x3 (arity_appl g c0 w x1 (arity_repl g c0 w x H5 x1 -(leq_sym g x1 x (asucc_inj g x1 x (arity_mono g c0 u (asucc g x1) H12 (asucc -g x) H6)))) v x3 H19) (arity_appl g c0 w x H5 (THead (Bind Abst) u t) (asucc -g x3) (arity_head g c0 u x H6 t (asucc g x3) H18)))))))) H15)))))))) H10))))) -H7))))) H4))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (_: (ty3 g c0 t3 t4)).(\lambda (H1: (ex2 A (\lambda (a1: -A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g +t)) (asucc g a1)))) (\lambda (x1: A).(\lambda (x2: A).(\lambda (H11: (eq A +(asucc g x0) (AHead x1 x2))).(\lambda (H12: (arity g c0 u (asucc g +x1))).(\lambda (H13: (arity g (CHead c0 (Bind Abst) u) t x2)).(let H14 \def +(sym_eq A (asucc g x0) (AHead x1 x2) H11) in (let H15 \def (asucc_gen_head g +x1 x2 x0 H14) in (ex2_ind A (\lambda (a0: A).(eq A x0 (AHead x1 a0))) +(\lambda (a0: A).(eq A x2 (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g c0 +(THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) +w (THead (Bind Abst) u t)) (asucc g a1)))) (\lambda (x3: A).(\lambda (H16: +(eq A x0 (AHead x1 x3))).(\lambda (H17: (eq A x2 (asucc g x3))).(let H18 \def +(eq_ind A x2 (\lambda (a: A).(arity g (CHead c0 (Bind Abst) u) t a)) H13 +(asucc g x3) H17) in (let H19 \def (eq_ind A x0 (\lambda (a: A).(arity g c0 v +a)) H8 (AHead x1 x3) H16) in (ex_intro2 A (\lambda (a1: A).(arity g c0 (THead +(Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w +(THead (Bind Abst) u t)) (asucc g a1))) x3 (arity_appl g c0 w x1 (arity_repl +g c0 w x H5 x1 (leq_sym g x1 x (asucc_inj g x1 x (arity_mono g c0 u (asucc g +x1) H12 (asucc g x) H6)))) v x3 H19) (arity_appl g c0 w x H5 (THead (Bind +Abst) u t) (asucc g x3) (arity_head g c0 u x H6 t (asucc g x3) H18)))))))) +H15)))))))) H10))))) H7))))) H4))))))))))) (\lambda (c0: C).(\lambda (t3: +T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 t3 t4)).(\lambda (H1: (ex2 A +(\lambda (a1: A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t4 t0)).(\lambda (H3: (ex2 A (\lambda (a1: A).(arity g c0 t4 a1)) (\lambda (a1: A).(arity g c0 t0 (asucc g a1))))).(let H4 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 t3 a1)) diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/Makefile b/helm/software/matita/contribs/LAMBDA-TYPES/Makefile index c0805522d..214ce0711 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/Makefile +++ b/helm/software/matita/contribs/LAMBDA-TYPES/Makefile @@ -1,6 +1,6 @@ H=@ -MATITAOPTIONS=-onepass +MATITAOPTIONS=$(MATITAUSEROPTIONS) -onepass DIR=$(shell basename $$PWD) diff --git a/helm/software/matita/legacy/Makefile b/helm/software/matita/legacy/Makefile index 9dd21dd3b..a8d99c3dd 100644 --- a/helm/software/matita/legacy/Makefile +++ b/helm/software/matita/legacy/Makefile @@ -1,5 +1,5 @@ DIR=$(shell basename $$PWD) -MATITAOPTIONS=-onepass +MATITAOPTIONS=$(MATITAUSEROPTIONS) -onepass $(DIR) all: ../matitac $(MATITAOPTIONS) diff --git a/helm/software/matita/matitacLib.ml b/helm/software/matita/matitacLib.ml index 80f99ed0d..7470b8feb 100644 --- a/helm/software/matita/matitacLib.ml +++ b/helm/software/matita/matitacLib.ml @@ -269,7 +269,6 @@ let compile options fname = ("Unwrapped exception, please fix: "^ snd (MatitaExcPp.to_string exn)); pp_times fname false big_bang big_bang_u big_bang_s; clean_exit baseuri false -;; module F = struct @@ -280,8 +279,7 @@ module F = let is_readonly_buri_of opts file = let buri = List.assoc "baseuri" opts in - Http_getter_storage.is_read_only (Librarian.mk_baseuri buri file) - ;; + Http_getter_storage.is_read_only (Librarian.mk_baseuri buri file) let root_and_target_of opts mafile = try @@ -292,30 +290,19 @@ module F = Some root, LibraryMisc.obj_file_of_baseuri ~must_exist:false ~baseuri ~writable:true with Librarian.NoRootFor x -> None, "" - ;; let mtime_of_source_object s = try Some (Unix.stat s).Unix.st_mtime with Unix.Unix_error (Unix.ENOENT, "stat", f) when f = s -> None - ;; let mtime_of_target_object s = try Some (Unix.stat s).Unix.st_mtime with Unix.Unix_error (Unix.ENOENT, "stat", f) when f = s -> None - ;; let build = compile;; let load_deps_file = Librarian.load_deps_file;; - let dotdothack s = - let rec aux = function - | ".." :: _ :: tl -> aux tl - | x -> x - in - String.concat "/" (aux (Str.split (Str.regexp "/") s)) - ;; - end module Make = Librarian.Make(F) -- 2.39.2